Results 1 to 4 of 4

Thread: Alpha Channel support is broken for GIMP png and bmp files

  1. #1
    Join Date
    Jul 2008
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Alpha Channel support is broken for GIMP png and bmp files

    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
    Attached Images Attached Images

  2. #2
    Join Date
    Jul 2008
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Alpha Channel support is broken for GIMP png and bmp files

    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.

  3. #3
    Join Date
    Jun 2015
    Posts
    1
    Qt products
    Platforms
    Unix/X11 Windows

    Default Re: Alpha Channel support is broken for GIMP png and bmp files

    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!

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Alpha Channel support is broken for GIMP png and bmp files

    The OP fixed the OP's problem (7 years ago, a new record?) by specifying the correct file name.

    Which problem are you having?

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.