提升HGImgFmt_CheckGifFile效率
This commit is contained in:
parent
9122af6f19
commit
bbe793f709
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue