00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00027 #ifndef __PDF_GRAPH_RAW_IMAGE_HEADER_INCLUDED__
00028 #define __PDF_GRAPH_RAW_IMAGE_HEADER_INCLUDED__
00029
00030 #ifndef __PDF_GRAPH_IMG_BASE_INCLUDED__
00031 #include "ImgBase.hh"
00032 #endif
00033
00034 #ifndef __IMAGE_IMAGE_HEADER_INCLUDED__
00035 #include "image/Image.hh"
00036 #endif
00037
00038 #include <boost/smart_ptr.hpp>
00039 #include <string>
00040
00041 namespace image
00042 {
00043 class CImage ;
00044 class CHeader ;
00045 }
00046
00047 namespace pdf { namespace graph {
00048
00068 class CImage : public CImgBase
00069 {
00070 public :
00071 enum EFilter { inflate, DCT, none } ;
00072
00073 private :
00074 image::CImage m_image ;
00075 EFilter m_filter ;
00076
00077 public :
00078 CImage( const image::CImage& image, EFilter filter = none ) ;
00079 ~CImage( ) ;
00080
00081 core::CObject* Dup( ) const ;
00082
00083 const core::CObjRef Write( core::CFile& file ) const ;
00084
00085 const image::CImage& Image( ) const ;
00086
00087 image::CImage& Image( ) ;
00088
00089 const image::CHeader& Header( ) const ;
00090
00091 protected :
00092 const CByteVec& GetContent( CByteVec& output ) const ;
00093 void MakeDictionary( core::CDictionary& dict ) const ;
00094
00095 private :
00096 const CByteVec& DCTEncode( CByteVec& output ) const ;
00097 const CByteVec& Inflate( CByteVec& output ) const ;
00098 static const std::string& FilterName( EFilter filter ) ;
00099 } ;
00100
00101 } }
00102
00103 #endif