PDA

View Full Version : Alpha Channel support is broken for GIMP png and bmp files



mschifter
24th July 2008, 22:07
Hi,

I'm rather new to 4.4.0 programming, however, the following code:

QImage temp(":res/ta_only.bmp");
bool test=temp.hasAlphaChannel();

always sets test to false though there is an alpha channel in the 32-bit .bmp file and in a .png variant. I'm using GIMP to edit the file and alpha channel, and the alpha channel shows up clearly in the channel display.

FWIW, the image draws all white using drawTexture (using OpenGL for rendering).

Any help would be appreciated.

Matt

mschifter
25th July 2008, 23:24
I've solved this. The texture file wasn't loading.

There is a bug with case sensitivity in the make system. Essentially, my file names embedded in the C++ file are case sensitive with respect to the Qt resource file. I say it's a problem with the make system because ordinarily if the file doesn't exist an error is generated.

alex.hanson@janicki.com
25th June 2015, 18:31
Having the same issue. I'm generating images with gmip2. I've tried .png, .jpeg, .bmp and .tiff.

Can you provide more information on how you resolved this issue?

Thanks!

ChrisW67
25th June 2015, 22:52
The OP fixed the OP's problem (7 years ago, a new record?) by specifying the correct file name.

Which problem are you having?