Hello~~!!
I tried to convert GIF to BMP Using Leadtool Version.15(visual c++ environment)
But I found some problems that converted result.
It succeeded converting the first frame, but next frames showed up just different part from the first frame.
Rest of part showed up like blank background.
It is following the process logic.
====================================================
nRet = L_LoadBitmapList ( szSrc,
&hList,
0,
ORDER_BGR,
NULL,
&fileInfo);
nRet = L_GetBitmapListCount(hList, &nCount);
if (nRet < 1 )
return nRet;
for (c = 0; c < (int)nCount; c++)
{
nRet = L_GetBitmapListItem(hList, c, &hTmpBitmap, sizeof(BITMAPHANDLE));
if(nRet != SUCCESS)
{
L_DestroyBitmapList(hList);
return nRet;
}
memset(tmpBuf, 0x00, sizeof(tmpBuf));
sprintf(tmpBuf, "%s%02d.%s", szDstBuf, c, szFileExt);
char2wchar(tmpBuf, szDst);
nRet = L_SaveBitmap(szDst, &hTmpBitmap, nFormat, 0, nQFactor, NULL);
}
====================================================
So I tried again to combine the second frame positioned the first frame position(playback offset).
But I didn't get the result what I wanted.
This is the following the combine logic.
====================================================
nRet = L_LoadBitmapList ( szSrc,
&hList,
0,
ORDER_BGR,
NULL,
&fileInfo);
nRet = L_GetBitmapListCount(hList, &nCount);
for (c = 0; c < (int)nCount; c++)
{
if(c == 0)
nRet = L_GetBitmapListItem(hList, c, &hTmpBitmap, sizeof(BITMAPHANDLE));
else
nRet = L_GetBitmapListItem(hList, c, &hTmpBitmap2, sizeof(BITMAPHANDLE));
memset(tmpBuf, 0x00, sizeof(tmpBuf));
sprintf(tmpBuf, "%s%02d.%s", szDstBuf, c, szFileExt);
char2wchar(tmpBuf, szDst);
if(c > 0)
{
int XDst = hTmpBitmap2.Left;
int YDst = hTmpBitmap2.Top;
int YSize = BITMAPHEIGHT(&hTmpBitmap2);
int XSize = BITMAPWIDTH(&hTmpBitmap2);
int XSrc = 0;
int YSrc = 0;
nRet = L_CombineBitmap(&hTmpBitmap, XDst, YDst, XSize, YSize, &hTmpBitmap2, XSrc, YSrc, CB_SRC_NOP | CB_OP_ADD | CB_DST_0 | CB_RES_NOP);
}
nRet = L_SaveBitmap(szDst, &hTmpBitmap, nFormat, nBitPerPixcel, nQFactor, NULL/*&SaveFileOption*/);
}
====================================================
I attached the file that used my test.
And result file what I expect, too.
Thanks for your Help :)
origin GIF File : green.gif
convert result file : ng/ng_1.bmp, nb_2.bmp
combine result file : combine/out00.BMP, out01.BMP
my expectation result file : ok/ok_1.bmp, ok_2.bmp