Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

Image.hh

00001 /*
00002 
00003     libpdf++: a C++ Free library to generate PDF file
00004     Copyright (C) 2002 Nestal Wan
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Lesser General Public
00008     License as published by the Free Software Foundation; either
00009     version 2.1 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Lesser General Public License for more details.
00015 
00016     You should have received a copy of the GNU Lesser General Public
00017     License along with this library; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 } } // end of namespace
00102 
00103 #endif

Generated on Sun Feb 2 09:16:05 2003 for libpdf++ by doxygen1.2.16