55 lines
1.8 KiB
C
55 lines
1.8 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);
|
|
|
|
#pragma pack(push)
|
|
#pragma pack(4)
|
|
|
|
typedef struct
|
|
{
|
|
HGUInt width; /* 图像宽 */
|
|
HGUInt height; /* 图像高 */
|
|
HGUInt colorResolution; /* 位深 */
|
|
HGUInt imageCount; /* 图像数量 */
|
|
}HGGifLoadInfo;
|
|
|
|
typedef struct
|
|
{
|
|
HGUInt width; /* 图像宽 */
|
|
HGUInt height; /* 图像高 */
|
|
}HGGifSaveInfo;
|
|
|
|
#pragma pack(pop)
|
|
|
|
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_RetrieveImageFromGifReader(HGGifReader reader, HGUInt *index, HGUInt *interval,
|
|
HGUInt imgType, HGUInt imgOrigin, HGImage* image);
|
|
|
|
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* interval,
|
|
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);
|
|
|
|
HGEXPORT HGResult HGAPI HGImgFmt_SaveGifImage(HGImage image, const HGGifSaveInfo* info,
|
|
HGUInt interval, HGColor bkColor, const HGChar* fileName);
|
|
|
|
#endif /* __HGGIF_H__ */ |