30 #ifndef __CLAW_JPEG_HPP__
31 #define __CLAW_JPEG_HPP__
65 struct jpeg_error_mgr
pub;
100 struct jpeg_source_mgr
pub;
104 std::istream& m_input;
107 const JOCTET* m_buffer;
110 const unsigned int m_buffer_size;
113 unsigned int m_stream_size;
116 unsigned int m_stream_position;
135 class grayscale_to_pixel32
145 void load( std::istream& f );
148 template<
class Convert>
149 void read_data( jpeg_decompress_struct& cinfo,
150 const Convert& pixel_convert );
152 void read_from_file( std::istream& f );
153 void decompress( std::istream& f, jpeg_decompress_struct& cinfo );
155 void create_decompress_info( jpeg_decompress_struct& cinfo,
156 source_manager& infile )
const;
178 options(
unsigned char compression_quality_,
bool progressive_ );
207 struct jpeg_destination_mgr
pub;
211 std::ostream& m_output;
217 const unsigned int m_buffer_size;
229 void set_options( jpeg_compress_struct& cinfo,
231 void save_image( jpeg_compress_struct& cinfo )
const;
233 void copy_pixel_line( JSAMPLE* data,
unsigned int y )
const;
235 void create_compress_info( jpeg_compress_struct& cinfo,
240 const image& m_image;
244 static const unsigned int s_rgb_pixel_size;
249 jpeg(
unsigned int w,
unsigned int h );
251 jpeg( std::istream& f );
253 void save( std::ostream& os,
262 #endif // __CLAW_JPEG_HPP__