3 * Purpose: JBG Image Class Loader and Writer
\r
5 /* ==========================================================
\r
6 * CxImageJBG (c) 18/Aug/2002 Davide Pizzolato - www.xdp.it
\r
7 * For conditions of distribution and use, see copyright notice in ximage.h
\r
9 * based on LIBJBG Copyright (c) 2002, Markus Kuhn - All rights reserved.
\r
10 * ==========================================================
\r
12 #if !defined(__ximaJBG_h)
\r
17 #if CXIMAGE_SUPPORT_JBG
\r
20 #include "../jbig/jbig.h"
\r
23 class CxImageJBG: public CxImage
\r
26 CxImageJBG(): CxImage(CXIMAGE_FORMAT_JBG) {}
\r
28 // bool Load(const TCHAR * imageFileName){ return CxImage::Load(imageFileName,CXIMAGE_FORMAT_JBG);}
\r
29 // bool Save(const TCHAR * imageFileName){ return CxImage::Save(imageFileName,CXIMAGE_FORMAT_JBG);}
\r
30 bool Decode(CxFile * hFile);
\r
31 bool Decode(FILE *hFile) { CxIOFile file(hFile); return Decode(&file); }
\r
33 #if CXIMAGE_SUPPORT_ENCODE
\r
34 bool Encode(CxFile * hFile);
\r
35 bool Encode(FILE *hFile) { CxIOFile file(hFile); return Encode(&file); }
\r
36 #endif // CXIMAGE_SUPPORT_ENCODE
\r
38 static void jbig_data_out(BYTE *buffer, unsigned int len, void *file)
\r
39 {((CxFile*)file)->Write(buffer,len,1);}
\r