提升HGImgFmt_CheckGifFile效率

This commit is contained in:
luoliangyi 2022-07-12 18:14:16 +08:00
parent 9122af6f19
commit bbe793f709
1 changed files with 4 additions and 4 deletions

View File

@ -398,12 +398,12 @@ HGResult HGAPI HGImgFmt_CheckGifFile(const HGChar* fileName, HGBool* isGif)
}
*isGif = HGFALSE;
HGGifReader reader = NULL;
HGImgFmt_OpenGifReader(fileName, NULL, &reader);
if (NULL != reader)
int err;
GifFileType* gifFile = DGifOpenFileName(fileName, &err);
if (NULL != gifFile)
{
*isGif = HGTRUE;
HGImgFmt_CloseGifReader(reader);
DGifCloseFile(gifFile, &err);
}
return HGBASE_ERR_OK;
}