code_app/modules/imgfmt/HGGif.h

55 lines
1.8 KiB
C
Raw Normal View History

2022-07-08 09:36:13 +00:00
#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);
#pragma pack(push)
#pragma pack(4)
2022-07-08 09:36:13 +00:00
typedef struct
{
HGUInt width; /* 图像宽 */
HGUInt height; /* 图像高 */
2022-07-11 03:40:57 +00:00
HGUInt colorResolution; /* 位深 */
2022-07-08 09:36:13 +00:00
HGUInt imageCount; /* 图像数量 */
}HGGifLoadInfo;
typedef struct
{
HGUInt width; /* 图像宽 */
HGUInt height; /* 图像高 */
}HGGifSaveInfo;
#pragma pack(pop)
2022-07-08 09:36:13 +00:00
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);
2022-07-12 02:21:55 +00:00
HGEXPORT HGResult HGAPI HGImgFmt_RetrieveImageFromGifReader(HGGifReader reader, HGUInt *index, HGUInt *interval,
2022-07-08 09:36:13 +00:00
HGUInt imgType, HGUInt imgOrigin, HGImage* image);
2022-07-12 02:21:55 +00:00
HGEXPORT HGResult HGAPI HGImgFmt_LoadImageFromGifReader(HGGifReader reader, HGUInt index, HGUInt* interval,
2022-07-11 03:40:57 +00:00
HGUInt imgType, HGUInt imgOrigin, HGImage* image);
2022-07-12 02:21:55 +00:00
HGEXPORT HGResult HGAPI HGImgFmt_LoadGifImage(const HGChar* fileName, HGGifLoadInfo* info, HGUInt* interval,
2022-07-08 09:36:13 +00:00
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, HGColor bkColor, HGImage image);
2022-07-08 09:36:13 +00:00
HGEXPORT HGResult HGAPI HGImgFmt_SaveGifImage(HGImage image, const HGGifSaveInfo* info,
HGUInt interval, HGColor bkColor, const HGChar* fileName);
2022-07-08 09:36:13 +00:00
#endif /* __HGGIF_H__ */