Here is my code:
Code: Select all
------------------------------
GFLC_SAVE_PARAMS save_option;
GFL_ERROR gflError;
save_option.setFormat(gflGetFormatIndexByName("png"));
GFLC_BITMAP * bitmap = new GFLC_BITMAP();
gflError = bitmap->create(GFL_RGBA,128,128);
//This GFLC_BITMAP is OK with type: GFL_RGBA
HDIB hdib3d=BitmapToDIB(ghBitmap3d,NULL);
//This DIB is also with 32 bits by pixel
if (hdib3d) {
gflError = bitmap->setHBITMAP(hdib3d);
// Then, the GFLC_BITMAP became a GFL_BGR type (3 components by pixel)!
bitmap->setTransparentIndex(0);
-----------------------
I am new on this library, something must be wrong, but what?
Thanks for any answer.
aditional code:
Code: Select all
GFL_ERROR GFLC_BITMAP::setHBITMAP(HDIB hDIB)
{
ERROR_Check(m_gflBitmap, "");
return gflConvertDIBIntoBitmap (hDIB, &m_gflBitmap );
}