I have a 256 colors PNG file with transparency.
If I just load the file and then save it also in PNG the transparency is lost. How can I keep it ?
Thanks in advance
Ithier
Here is my code:
Code: Select all
#include "libgfl.h"
int main(int argc, char *argv[])
{
	gflLibraryInit();
	GFL_LOAD_PARAMS load_option;
	gflGetDefaultLoadParams( &load_option );
    GFL_FILE_INFORMATION    GflFI;
    GFL_BITMAP*     GflBitmap;
	gflLoadBitmap(argv[1], &GflBitmap, &load_option, &GflFI);
   	GFL_SAVE_PARAMS save_option;
    gflGetDefaultSaveParams(&save_option);
    save_option.FormatIndex = gflGetFormatIndexByName("png");
    gflSaveBitmap("o.png", GflBitmap, &save_option);
	return 0;
}

