19 #ifndef PAGESPEED_KERNEL_IMAGE_JPEG_READER_H_
20 #define PAGESPEED_KERNEL_IMAGE_JPEG_READER_H_
28 struct jpeg_decompress_struct;
29 struct jpeg_error_mgr;
31 namespace net_instaweb {
37 namespace image_compression {
62 jpeg_decompress_struct *decompress_struct()
const {
return jpeg_decompress_; }
64 void PrepareForRead(
const void* image_data,
size_t image_length);
67 jpeg_decompress_struct *jpeg_decompress_;
68 jpeg_error_mgr *decompress_error_;
86 size_t buffer_length);
102 unsigned char* row_pointer_[1];
103 PixelFormat pixel_format_;
107 size_t bytes_per_row_;
108 bool was_initialized_;
109 bool is_progressive_;
virtual bool HasMoreScanLines()
Returns true if there are more scanlines to read.
Definition: jpeg_reader.h:94
Definition: jpeg_reader.h:57
Definition: scanline_status.h:93
Definition: jpeg_reader.h:77
virtual size_t GetBytesPerScanline()
Return the number of bytes in a row (without padding).
Definition: jpeg_reader.h:92
virtual PixelFormat GetPixelFormat()
Returns the pixel format that need to be used by writer.
Definition: jpeg_reader.h:95
virtual size_t GetImageHeight()
Returns the height of the image.
Definition: jpeg_reader.h:96
virtual bool IsProgressive()
Definition: jpeg_reader.h:98
virtual size_t GetImageWidth()
Returns the width of the image.
Definition: jpeg_reader.h:97
Definition: scanline_interface.h:32
Definition: message_handler.h:39
virtual ScanlineStatus ReadNextScanlineWithStatus(void **out_scanline_bytes)
Return the next row of pixels.
virtual ScanlineStatus InitializeWithStatus(const void *image_buffer, size_t buffer_length)