提升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;
|
*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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue