Loading BMP: wrong colors

Hi!

I have tried to load BMP images into blender, both using python and the UV/Image Editor (GUI). The images load, and no errors/warnings are given, BUT the colors are wrong. When it should be a human-skin like color, it’s blue!

Example:
http://jondrange.googlepages.com/alyx_face.jpg

Is this a bug in blender? My first thought is that Blender switches the red and blue channel, but I can’t tell for sure. Hope to get an answer to why it’s like this. Because what’s the point of having the possibility to import BMP images when Blender cannot view them correctly?

/JMD

You’re absolutely correct about the R & B channel switching. It’s probably an error in the image exporter you used to create it, not in Blender itself. Why? because when I exported it from Blender as a bmp (after switching the channels in the compositor) it re-imported with the channels correctly ordered. When I export bmps from Photoshop they work fine also and it worked fine with this image too.

Attachments


What system are you on? I wonder if it’s a byte order issue…

Rambobaby: The BMP is created with a program that converts VTF(= Valve Texture Format) files to BMP or TGA. I am not home atm. and I don’t remember the name of this program (probably “VTF Viewer” or something similuar). I exported the texture used for Alyx’ head in Half-Life 2 with this program. When opening the file in both Photoshop and in the built-in Image Viewer in Windows XP, the colors are correct.

broken: Windows XP SP2, AMD Athlon XP machine. I don’t think byte order is the problem. BUT there’s a chance the alpha channel is exported too: 32bit BMP, if there is a such thing?

/JMD

Photoshop lists 16, 24, and 32 bit BMP in save as options.