gflLoadBitmapFromMemory() and PNG ColorType 3 with Alpha

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, helmut, xnview

Ralf
Posts: 7
Joined: Fri Apr 11, 2008 9:15 am

gflLoadBitmapFromMemory() and PNG ColorType 3 with Alpha

Post by Ralf »

i'm using gflLoadBitmapFromMemory() on a PNG file image with ColorType 3 (indexed color) and transparency chunk which stores the Alpha channel for the LUT.

Code: Select all

    GFL_LOAD_PARAMS     load_params;
    gflGetDefaultLoadParams( &load_params );
    load_params.Flags = GFL_LOAD_ORIGINAL_DEPTH | GFL_LOAD_FORCE_COLOR_MODEL;
    load_params.ColorModel = GFL_RGBA;

    GFL_BITMAP          *p_bitmap = 0;
    GFL_ERROR const     gfl_error = gflLoadBitmapFromMemory( reinterpret_cast<GFL_UINT8 const *>(pIn), filled, &p_bitmap, &load_params, NULL );
unfortunately the bitmap returned by gflLoadBitmapFromMemory() apparently ignores the Alpha channel from the PNG and returns image data with an Alpha value of 0xFF for all pixels (tested with GFL SDK 2.82 and 3.11) :(

we'd really appreciate a fix for this!
User avatar
xnview
Author of XnView
Posts: 44723
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: gflLoadBitmapFromMemory() and PNG ColorType 3 with Alpha

Post by xnview »

Alpha for 8 bits colors PNG can't be loaded...
Pierre.