Page Speed Optimization Libraries
1.13.35.1
|
#include "png_optimizer.h"
Public Member Functions | |
PngScanlineReader (MessageHandler *handler) | |
jmp_buf * | GetJmpBuf () |
virtual bool | Reset () |
bool | InitializeRead (const PngReaderInterface &reader, const GoogleString &in) |
Initializes the read structures with the given input. | |
bool | InitializeRead (const PngReaderInterface &reader, const GoogleString &in, bool *is_opaque) |
virtual size_t | GetBytesPerScanline () |
Returns number of bytes that required to store a scanline. | |
virtual bool | HasMoreScanLines () |
Returns true if there are more scanlines to read. | |
virtual ScanlineStatus | ReadNextScanlineWithStatus (void **out_scanline_bytes) |
virtual size_t | GetImageHeight () |
Returns the height of the image. | |
virtual size_t | GetImageWidth () |
Returns the width of the image. | |
virtual PixelFormat | GetPixelFormat () |
Returns the pixel format that need to be used by writer. | |
virtual bool | IsProgressive () |
void | set_transform (int transform) |
void | set_require_opaque (bool require_opaque) |
int | GetColorType () |
bool | GetBackgroundColor (unsigned char *red, unsigned char *green, unsigned char *blue) |
virtual ScanlineStatus | InitializeWithStatus (const void *image_buffer, size_t buffer_length) |
This is a no-op and should not be called. | |
Public Member Functions inherited from pagespeed::image_compression::ScanlineReaderInterface | |
bool | Initialize (const void *image_buffer, size_t buffer_length) |
bool | ReadNextScanline (void **out_scanline_bytes) |
Reader for PNG-encoded data. This is sample code on how someone can use the scanline reader interface. bool func() { if (setjmp(*GetJmpBuf())) { return false; }
InitializeRead(...) while (HasMoreScanlines()) { Scanline line; ReadNextScanline(line); .... .... } }
|
virtual |
Returns true if the original image was encoded progressively by the origin site, so that it could be progressively rendered while the image contents were being transferred
Implements pagespeed::image_compression::ScanlineReaderInterface.
|
virtual |
Reads the next available scanline. Returns the ScanlineStatus of the conversion.
Implements pagespeed::image_compression::ScanlineReaderInterface.
|
virtual |
This will only return false as a result of a longjmp due to an unhandled libpng error.
Implements pagespeed::image_compression::ScanlineReaderInterface.