19 #ifndef PAGESPEED_KERNEL_IMAGE_PIXEL_FORMAT_OPTIMIZER_H_
20 #define PAGESPEED_KERNEL_IMAGE_PIXEL_FORMAT_OPTIMIZER_H_
32 namespace image_compression {
61 return bytes_per_row_;
72 return reader_->GetImageHeight();
77 return reader_->GetImageWidth();
87 return reader_->IsProgressive();
93 size_t buffer_length);
97 size_t bytes_per_row_;
98 PixelFormat pixel_format_;
101 bool was_initialized_;
virtual PixelFormat GetPixelFormat()
Returns the pixel format of the image.
Definition: pixel_format_optimizer.h:81
Definition: scanline_status.h:93
virtual size_t GetImageWidth()
Returns the width of the image.
Definition: pixel_format_optimizer.h:76
Definition: pixel_format_optimizer.h:46
virtual ScanlineStatus InitializeWithStatus(const void *image_buffer, size_t buffer_length)
Definition: scoped_ptr.h:30
virtual ScanlineStatus ReadNextScanlineWithStatus(void **out_scanline_bytes)
Definition: scanline_interface.h:32
Definition: message_handler.h:39
virtual size_t GetImageHeight()
Returns the height of the image.
Definition: pixel_format_optimizer.h:71
virtual size_t GetBytesPerScanline()
Returns number of bytes required to store a scanline.
Definition: pixel_format_optimizer.h:60
ScanlineStatus Initialize(ScanlineReaderInterface *reader)
PixelFormatOptimizer acquires ownership of reader, even in case of failure.
virtual bool Reset()
Resets the resizer to its initial state. Always returns true.
virtual bool HasMoreScanLines()
Definition: pixel_format_optimizer.h:66
virtual bool IsProgressive()
Returns true if the image is encoded in progressive / interlacing format.
Definition: pixel_format_optimizer.h:86