提升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; *isGif = HGFALSE;
HGGifReader reader = NULL; int err;
HGImgFmt_OpenGifReader(fileName, NULL, &reader); GifFileType* gifFile = DGifOpenFileName(fileName, &err);
if (NULL != reader) if (NULL != gifFile)
{ {
*isGif = HGTRUE; *isGif = HGTRUE;
HGImgFmt_CloseGifReader(reader); DGifCloseFile(gifFile, &err);
} }
return HGBASE_ERR_OK; return HGBASE_ERR_OK;
} }