I'm trying to work with animated gif (attached).
Problem is: loading frame > 0. GFL decodes only changes (?) of frame 0. Is it true?
Part of code:
Code: Select all
GFLBitmap = NULL;
GFL_LOAD_PARAMS LoadParams = {0};
gflGetDefaultLoadParams(&LoadParams);
LoadParams.Flags = GFL_LOAD_COMMENT;
LoadParams.ColorModel = GFL_BGRA;
LoadParams.LinePadding = 1;
LoadParams.ImageWanted = Image->iPage;
GFL_FILE_INFORMATION FileInformation = {0};
if (!gflLoadBitmapW(Image->FileName, &GFLBitmap, &LoadParams, &FileInformation))
{
#ifdef _DEBUG
wchar_t szDbg[MAX_PATH*2];
wsprintf(szDbg, L"Decoding (%s), frame %i of %i\n", Image->FileName, Image->iPage, FileInformation.NumberOfImages);
OutputDebugString(szDbg);
wsprintf(szDbg, L" GFLBitmap: W=%i, H=%i, XO=%i, YO=%i\n", GFLBitmap->Width, GFLBitmap->Height, GFLBitmap->XOffset, GFLBitmap->YOffset);
OutputDebugString(szDbg);
wsprintf(szDbg, L" LoadParams: W=%i, H=%i\n", LoadParams.Width, LoadParams.Height);
OutputDebugString(szDbg);
wsprintf(szDbg, L" FileInfo: W=%i, H=%i, XO=%i, YO=%i\n", FileInformation.Width, FileInformation.Height, FileInformation.XOffset, FileInformation.YOffset);
OutputDebugString(szDbg);
OutputDebugString(L"\n");
#endif
Code: Select all
Decoding (F:\VCProject\FarPlugin\ConEmu\Bugs\Birthday_gift.gif), frame 0 of 19
GFLBitmap: W=240, H=200, XO=0, YO=0
LoadParams: W=256, H=256
FileInfo: W=240, H=200, XO=0, YO=0
Decoding (F:\VCProject\FarPlugin\ConEmu\Bugs\Birthday_gift.gif), frame 1 of 19
GFLBitmap: W=80, H=115, XO=0, YO=0
LoadParams: W=256, H=256
FileInfo: W=80, H=115, XO=0, YO=0
Decoding (F:\VCProject\FarPlugin\ConEmu\Bugs\Birthday_gift.gif), frame 2 of 19
GFLBitmap: W=121, H=176, XO=0, YO=0
LoadParams: W=256, H=256
FileInfo: W=121, H=176, XO=0, YO=0
Decoding (F:\VCProject\FarPlugin\ConEmu\Bugs\Birthday_gift.gif), frame 3 of 19
GFLBitmap: W=124, H=112, XO=0, YO=0
LoadParams: W=256, H=256
FileInfo: W=124, H=112, XO=0, YO=0
Decoding (F:\VCProject\FarPlugin\ConEmu\Bugs\Birthday_gift.gif), frame 4 of 19
GFLBitmap: W=168, H=86, XO=0, YO=0
LoadParams: W=256, H=256
FileInfo: W=168, H=86, XO=0, YO=0
Decoding (F:\VCProject\FarPlugin\ConEmu\Bugs\Birthday_gift.gif), frame 5 of 19
GFLBitmap: W=193, H=149, XO=0, YO=0
LoadParams: W=256, H=256
FileInfo: W=193, H=149, XO=0, YO=0
Can You help me? What's wrong, arguments? Or a bug in SDK?