30 #ifndef __CLAW_PNG_HPP__
31 #define __CLAW_PNG_HPP__
70 void read( png_bytep data, png_size_t length );
74 std::istream& m_input;
82 void load( std::istream& f );
85 void read_from_file( std::istream& f );
86 void check_if_png( png_structp png_ptr, std::istream& f )
const;
88 void read_image( png_structp png_ptr, png_infop info_ptr );
89 void read_sequential_image( png_structp png_ptr, png_infop info_ptr );
90 void read_interlaced_image( png_structp png_ptr, png_infop info_ptr,
91 unsigned int passes );
93 void copy_pixel_line( png_bytep data,
unsigned int y );
95 void create_read_structures( png_structp& png_ptr,
96 png_infop& info_ptr )
const;
105 static const unsigned int s_rgba_pixel_size;
126 no_compression = Z_NO_COMPRESSION,
127 best_speed = Z_BEST_SPEED,
128 best_compression = Z_BEST_COMPRESSION,
129 default_compression = Z_DEFAULT_COMPRESSION
169 void write( png_bytep data, png_size_t length );
174 std::ostream& m_output;
186 void set_options( png_structp png_ptr, png_infop info_ptr,
188 void save_image( png_structp png_ptr, png_infop info_ptr )
const;
190 void copy_pixel_line( png_bytep data,
unsigned int y )
const;
192 void create_write_structures( png_structp& png_ptr,
193 png_infop& info_ptr )
const;
198 const image& m_image;
202 static const unsigned int s_rgba_pixel_size;
207 png(
unsigned int w,
unsigned int h );
209 png( std::istream& f );
211 void save( std::ostream& os,
218 #endif // __CLAW_PNG_HPP__