Page Speed Optimization Libraries
1.13.35.1
|
Reader for PNG-encoded data. More...
#include "png_optimizer.h"
Public Member Functions | |
PngReader (MessageHandler *handler) | |
virtual bool | ReadPng (const GoogleString &body, png_structp png_ptr, png_infop info_ptr, int transforms, bool require_opaque) const |
virtual bool | GetAttributes (const GoogleString &body, int *out_width, int *out_height, int *out_bit_depth, int *out_color_type) const |
Public Member Functions inherited from pagespeed::image_compression::PngReaderInterface | |
bool | ReadPng (const GoogleString &body, png_structp png_ptr, png_infop info_ptr, int transforms) const |
Additional Inherited Members | |
Static Public Member Functions inherited from pagespeed::image_compression::PngReaderInterface | |
static bool | GetBackgroundColor (png_structp png_ptr, png_infop info_ptr, unsigned char *red, unsigned char *green, unsigned char *blue, MessageHandler *handler) |
static bool | IsAlphaChannelOpaque (png_structp png_ptr, png_infop info_ptr, MessageHandler *handler) |
Reader for PNG-encoded data.
|
virtual |
Get just the attributes of the given image. out_bit_depth is the number of bits per channel. out_color_type is one of the PNG_COLOR_TYPE_* declared in png.h.
Implements pagespeed::image_compression::PngReaderInterface.
|
virtual |
Parse the contents of body, convert to a PNG, and populate the PNG structures with the PNG representation. If 'require_opaque' is true, returns an image without an alpha channel if the original image has no transparent pixels, and fails otherwise. Returns true on success, false on failure.
Implements pagespeed::image_compression::PngReaderInterface.