-/*\r
- * File: ximatif.h\r
- * Purpose: TIFF Image Class Loader and Writer\r
- */\r
-/* ==========================================================\r
- * CxImageTIF (c) 07/Aug/2001 Davide Pizzolato - www.xdp.it\r
- * For conditions of distribution and use, see copyright notice in ximage.h\r
- *\r
- * Special thanks to Troels Knakkergaard for new features, enhancements and bugfixes\r
- *\r
- * Special thanks to Abe <God(dot)bless(at)marihuana(dot)com> for MultiPageTIFF code.\r
- *\r
- * LibTIFF is:\r
- * Copyright (c) 1988-1997 Sam Leffler\r
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.\r
- * ==========================================================\r
- */\r
-\r
-#if !defined(__ximatif_h)\r
-#define __ximatif_h\r
-\r
-#include "ximage.h"\r
-\r
-#if CXIMAGE_SUPPORT_TIF\r
-\r
-#include "../tiff/tiffio.h"\r
-\r
-class DLL_EXP CxImageTIF: public CxImage\r
-{\r
-public:\r
- CxImageTIF(): CxImage(CXIMAGE_FORMAT_TIF) {m_tif2=NULL; m_multipage=false; m_pages=0;}\r
- ~CxImageTIF();\r
-\r
- TIFF* TIFFOpenEx(CxFile * hFile);\r
- void TIFFCloseEx(TIFF* tif);\r
-\r
-// bool Load(const TCHAR * imageFileName){ return CxImage::Load(imageFileName,CXIMAGE_FORMAT_TIF);}\r
-// bool Save(const TCHAR * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_TIF);}\r
- bool Decode(CxFile * hFile);\r
- bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); }\r
-\r
-#if CXIMAGE_SUPPORT_ENCODE\r
- bool Encode(CxFile * hFile, bool bAppend=false);\r
- bool Encode(CxFile * hFile, CxImage ** pImages, int pagecount);\r
- bool Encode(FILE *hFile, bool bAppend=false) { CxIOFile file(hFile); return Encode(&file,bAppend); }\r
- bool Encode(FILE *hFile, CxImage ** pImages, int pagecount)\r
- { CxIOFile file(hFile); return Encode(&file, pImages, pagecount); }\r
-#endif // CXIMAGE_SUPPORT_ENCODE\r
-\r
-protected:\r
- void TileToStrip(uint8* out, uint8* in, uint32 rows, uint32 cols, int outskew, int inskew);\r
- bool EncodeBody(TIFF *m_tif, bool multipage=false, int page=0, int pagecount=0);\r
- TIFF *m_tif2;\r
- bool m_multipage;\r
- int m_pages;\r
- void MoveBits( BYTE* dest, BYTE* from, int count, int bpp );\r
- void MoveBitsPal( BYTE* dest, BYTE*from, int count, int bpp, RGBQUAD* pal );\r
-};\r
-\r
-#endif\r
-\r
-#endif\r
+/*
+ * File: ximatif.h
+ * Purpose: TIFF Image Class Loader and Writer
+ */
+/* ==========================================================
+ * CxImageTIF (c) 07/Aug/2001 Davide Pizzolato - www.xdp.it
+ * For conditions of distribution and use, see copyright notice in ximage.h
+ *
+ * Special thanks to Troels Knakkergaard for new features, enhancements and bugfixes
+ *
+ * Special thanks to Abe <God(dot)bless(at)marihuana(dot)com> for MultiPageTIFF code.
+ *
+ * LibTIFF is:
+ * Copyright (c) 1988-1997 Sam Leffler
+ * Copyright (c) 1991-1997 Silicon Graphics, Inc.
+ * ==========================================================
+ */
+
+#if !defined(__ximatif_h)
+#define __ximatif_h
+
+#include "ximage.h"
+
+#if CXIMAGE_SUPPORT_TIF
+
+#include "../tiff/tiffio.h"
+
+class DLL_EXP CxImageTIF: public CxImage
+{
+public:
+ CxImageTIF(): CxImage(CXIMAGE_FORMAT_TIF) {m_tif2=NULL; m_multipage=false; m_pages=0;}
+ ~CxImageTIF();
+
+ TIFF* TIFFOpenEx(CxFile * hFile);
+ void TIFFCloseEx(TIFF* tif);
+
+// bool Load(const TCHAR * imageFileName){ return CxImage::Load(imageFileName,CXIMAGE_FORMAT_TIF);}
+// bool Save(const TCHAR * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_TIF);}
+ bool Decode(CxFile * hFile);
+ bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); }
+
+#if CXIMAGE_SUPPORT_ENCODE
+ bool Encode(CxFile * hFile, bool bAppend=false);
+ bool Encode(CxFile * hFile, CxImage ** pImages, int pagecount);
+ bool Encode(FILE *hFile, bool bAppend=false) { CxIOFile file(hFile); return Encode(&file,bAppend); }
+ bool Encode(FILE *hFile, CxImage ** pImages, int pagecount)
+ { CxIOFile file(hFile); return Encode(&file, pImages, pagecount); }
+#endif // CXIMAGE_SUPPORT_ENCODE
+
+protected:
+ void TileToStrip(uint8* out, uint8* in, uint32 rows, uint32 cols, int outskew, int inskew);
+ bool EncodeBody(TIFF *m_tif, bool multipage=false, int page=0, int pagecount=0);
+ TIFF *m_tif2;
+ bool m_multipage;
+ int m_pages;
+ void MoveBits( BYTE* dest, BYTE* from, int count, int bpp );
+ void MoveBitsPal( BYTE* dest, BYTE*from, int count, int bpp, RGBQUAD* pal );
+};
+
+#endif
+
+#endif