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