#ifndef __HGTIFF_H__ #define __HGTIFF_H__ #include "../base/HGDef.h" #include "../base/HGBaseErr.h" #include "HGImgFmtErr.h" #include "../base/HGImage.h" HG_DECLARE_HANDLE(HGTiffReader); HG_DECLARE_HANDLE(HGTiffWriter); typedef struct { HGUInt width; HGUInt height; HGUShort bitsPerSample; HGUShort samplesPerPixel; HGUShort compression; HGUShort resolutionUnit; HGFloat xResolution; HGFloat yResolution; }UPTiffLoadInfo; typedef struct { HGUShort resolutionUnit; HGFloat xResolution; HGFloat yResolution; }UPTiffSaveInfo; HGEXPORT HGResult HGAPI HGImgFmt_CheckTiffFile(const HGChar* fileName, HGBool* isTiff); HGEXPORT HGResult HGAPI HGImgFmt_OpenTiffReader(const HGChar* fileName, HGTiffReader* reader); HGEXPORT HGResult HGAPI HGImgFmt_CloseTiffReader(HGTiffReader reader); HGEXPORT HGResult HGAPI HGImgFmt_GetTiffPageCount(HGTiffReader reader, HGUInt* count); HGEXPORT HGResult HGAPI HGImgFmt_LoadImageFromTiffReader(HGTiffReader reader, HGUInt index, UPTiffLoadInfo* info, HGUInt imgType, HGUInt imgOrigin, HGImage* image); HGEXPORT HGResult HGAPI HGImgFmt_OpenTiffWriter(const HGChar* fileName, HGTiffWriter* writer); HGEXPORT HGResult HGAPI HGImgFmt_CloseTiffWriter(HGTiffWriter writer); HGEXPORT HGResult HGAPI HGImgFmt_SaveImageToTiffWriter(HGTiffWriter writer, HGImage image, const UPTiffSaveInfo* info); #endif /* __HGTIFF_H__ */