Loading BMP texture fails in 1.6

Hi,

I’m trying to load a BMP texture in Panda 1.6 with following code:

tex_diffuse = loader.loadTexture('mytexture_d.bmp')
cube_node.setTexture(tex_diffuse, 1)

I get this error message:

:pnmimage(error): BMP: cannot handle cBitCount: 32

Anyone has an idea of what the problem is?

Edit:
Seems related to Alpha channel in BMP. If I resave my bitmap without Alpha channel, it loads gracefully. Is that a bug ? Are RGBA bitmaps supported in Panda 1.7?

Thanks
-David

I don’t know what did cause your error but for sure Panda 1.6 does support RGBA.
There is a topic in the manual discussing few problems with alpha channel… It might be linked to that.
En espérant que cela t’aide :wink:

Although panda supports RGBA in certain image formats like tiff and png, it doesn’t support RGBA BMP files. In fact, I’ve never heard of RGBA BMP files before; it must be a relatively new addition to the format.

David

Thanks for your answer David

You touched my curiosity, so I searched and found this on the Bitmap Wikipedia page http://en.wikipedia.org/wiki/BMP_file_format:

So “relatively new” depends on one’s age :slight_smile: Almost 10 years since XP was released, frightening isn’t it?

@tallmystcarpet: Merci quand même :slight_smile: