3 * Purpose: TIFF Image Class Loader and Writer
\r
5 /* ==========================================================
\r
6 * CxImageTIF (c) 07/Aug/2001 Davide Pizzolato - www.xdp.it
\r
7 * For conditions of distribution and use, see copyright notice in ximage.h
\r
9 * Special thanks to Troels Knakkergaard for new features, enhancements and bugfixes
\r
11 * Special thanks to Abe <God(dot)bless(at)marihuana(dot)com> for MultiPageTIFF code.
\r
14 * Copyright (c) 1988-1997 Sam Leffler
\r
15 * Copyright (c) 1991-1997 Silicon Graphics, Inc.
\r
16 * ==========================================================
\r
19 #if !defined(__ximatif_h)
\r
24 #if CXIMAGE_SUPPORT_TIF
\r
26 #include "../tiff/tiffio.h"
\r
28 class DLL_EXP CxImageTIF: public CxImage
\r
31 CxImageTIF(): CxImage(CXIMAGE_FORMAT_TIF) {m_tif2=NULL; m_multipage=false; m_pages=0;}
\r
34 TIFF* TIFFOpenEx(CxFile * hFile);
\r
35 void TIFFCloseEx(TIFF* tif);
\r
37 // bool Load(const TCHAR * imageFileName){ return CxImage::Load(imageFileName,CXIMAGE_FORMAT_TIF);}
\r
38 // bool Save(const TCHAR * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_TIF);}
\r
39 bool Decode(CxFile * hFile);
\r
40 bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); }
\r
42 #if CXIMAGE_SUPPORT_ENCODE
\r
43 bool Encode(CxFile * hFile, bool bAppend=false);
\r
44 bool Encode(CxFile * hFile, CxImage ** pImages, int pagecount);
\r
45 bool Encode(FILE *hFile, bool bAppend=false) { CxIOFile file(hFile); return Encode(&file,bAppend); }
\r
46 bool Encode(FILE *hFile, CxImage ** pImages, int pagecount)
\r
47 { CxIOFile file(hFile); return Encode(&file, pImages, pagecount); }
\r
48 #endif // CXIMAGE_SUPPORT_ENCODE
\r
51 void TileToStrip(uint8* out, uint8* in, uint32 rows, uint32 cols, int outskew, int inskew);
\r
52 bool EncodeBody(TIFF *m_tif, bool multipage=false, int page=0, int pagecount=0);
\r
56 void MoveBits( BYTE* dest, BYTE* from, int count, int bpp );
\r
57 void MoveBitsPal( BYTE* dest, BYTE*from, int count, int bpp, RGBQUAD* pal );
\r