tranform image format for PIX to RGB
verify format transform and adjust code