30 #ifndef __CLAW_JPEG_HPP__
31 #define __CLAW_JPEG_HPP__
64 struct jpeg_error_mgr
pub;
67 jmp_buf setjmp_buffer;
99 struct jpeg_source_mgr
pub;
103 std::istream& m_input;
106 const JOCTET* m_buffer;
109 const unsigned int m_buffer_size;
112 unsigned int m_stream_size;
115 unsigned int m_stream_position;
134 class grayscale_to_pixel32
144 void load( std::istream& f );
147 template<
class Convert>
148 void read_data( jpeg_decompress_struct& cinfo,
149 const Convert& pixel_convert );
151 void read_from_file( std::istream& f );
152 void decompress( std::istream& f, jpeg_decompress_struct& cinfo );
154 void create_decompress_info( jpeg_decompress_struct& cinfo,
155 source_manager& infile )
const;
177 options(
unsigned char compression_quality_,
bool progressive_ );
206 struct jpeg_destination_mgr
pub;
210 std::ostream& m_output;
216 const unsigned int m_buffer_size;
228 void set_options( jpeg_compress_struct& cinfo,
230 void save_image( jpeg_compress_struct& cinfo )
const;
232 void copy_pixel_line( JSAMPLE* data,
unsigned int y )
const;
234 void create_compress_info( jpeg_compress_struct& cinfo,
239 const image& m_image;
243 static const unsigned int s_rgb_pixel_size;
248 jpeg(
unsigned int w,
unsigned int h );
250 jpeg( std::istream& f );
252 void save( std::ostream& os,
261 #endif // __CLAW_JPEG_HPP__