46 lines
1.5 KiB
C
46 lines
1.5 KiB
C
|
#ifndef __HGGIF_H__
|
|||
|
#define __HGGIF_H__
|
|||
|
|
|||
|
#include "../base/HGDef.h"
|
|||
|
#include "../base/HGBaseErr.h"
|
|||
|
#include "HGImgFmtErr.h"
|
|||
|
#include "../base/HGImage.h"
|
|||
|
|
|||
|
HG_DECLARE_HANDLE(HGGifReader);
|
|||
|
HG_DECLARE_HANDLE(HGGifWriter);
|
|||
|
|
|||
|
typedef struct
|
|||
|
{
|
|||
|
HGUInt width; /* 图像宽 */
|
|||
|
HGUInt height; /* 图像高 */
|
|||
|
HGUInt colors; /* 颜色数量 */
|
|||
|
HGUInt imageCount; /* 图像数量 */
|
|||
|
}HGGifLoadInfo;
|
|||
|
|
|||
|
typedef struct
|
|||
|
{
|
|||
|
HGUInt width; /* 图像宽 */
|
|||
|
HGUInt height; /* 图像高 */
|
|||
|
}HGGifSaveInfo;
|
|||
|
|
|||
|
HGEXPORT HGResult HGAPI HGImgFmt_CheckGifFile(const HGChar* fileName, HGBool* isGif);
|
|||
|
|
|||
|
HGEXPORT HGResult HGAPI HGImgFmt_OpenGifReader(const HGChar* fileName, HGGifLoadInfo* info, HGGifReader* reader);
|
|||
|
|
|||
|
HGEXPORT HGResult HGAPI HGImgFmt_CloseGifReader(HGGifReader reader);
|
|||
|
|
|||
|
HGEXPORT HGResult HGAPI HGImgFmt_LoadImageFromGifReader(HGGifReader reader, HGUInt *index, HGUInt *interval,
|
|||
|
HGUInt imgType, HGUInt imgOrigin, HGImage* image);
|
|||
|
|
|||
|
HGEXPORT HGResult HGAPI HGImgFmt_LoadGifImage(const HGChar* fileName, HGGifLoadInfo* info,
|
|||
|
HGUInt imgType, HGUInt imgOrigin, HGImage* image);
|
|||
|
|
|||
|
HGEXPORT HGResult HGAPI HGImgFmt_OpenGifWriter(const HGChar* fileName, const HGGifSaveInfo* info, HGGifWriter* writer);
|
|||
|
|
|||
|
HGEXPORT HGResult HGAPI HGImgFmt_CloseGifWriter(HGGifWriter writer);
|
|||
|
|
|||
|
HGEXPORT HGResult HGAPI HGImgFmt_SaveImageToGifWriter(HGGifWriter writer, HGUInt interval, HGImage image);
|
|||
|
|
|||
|
HGEXPORT HGResult HGAPI HGImgFmt_SaveGifImage(HGImage image, const HGGifSaveInfo* info, const HGChar* fileName);
|
|||
|
|
|||
|
#endif /* __HGGIF_H__ */
|