Page Speed Optimization Libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
pagespeed::image_compression::PngScanlineWriter Class Reference

#include "png_optimizer.h"

Inheritance diagram for pagespeed::image_compression::PngScanlineWriter:

Public Member Functions

 PngScanlineWriter (MessageHandler *handler)
virtual ScanlineStatus InitWithStatus (const size_t width, const size_t height, PixelFormat pixel_format)
virtual ScanlineStatus InitializeWriteWithStatus (const void *params, GoogleString *png_image)
virtual ScanlineStatus WriteNextScanlineWithStatus (const void *scanline_bytes)
 Write a scanline with the data provided. Return false in case of error.
virtual ScanlineStatus FinalizeWriteWithStatus ()
- Public Member Functions inherited from pagespeed::image_compression::ScanlineWriterInterface
bool Init (const size_t width, const size_t height, PixelFormat pixel_format)
bool InitializeWrite (const void *config, GoogleString *const out)
bool WriteNextScanline (const void *scanline_bytes)
bool FinalizeWrite ()

Detailed Description

Class PngScanlineWriter writes a PNG image. It supports Gray_8, RGB_888, and RGBA_8888 formats.

Member Function Documentation

virtual ScanlineStatus pagespeed::image_compression::PngScanlineWriter::FinalizeWriteWithStatus ( )

Finalize write structure once all scanlines are written. If FinalizeWriter() is called before all of the scanlines have been written, the object will be reset to the initial state.

Implements pagespeed::image_compression::ScanlineWriterInterface.

virtual ScanlineStatus pagespeed::image_compression::PngScanlineWriter::InitializeWriteWithStatus ( const void *  params,
GoogleString png_image 

Initialize additional parameters for writing the image using 'params', which should be a PngCompressParams*. You can set 'params' to NULL to use the default compression configuration.

Implements pagespeed::image_compression::ScanlineWriterInterface.

virtual ScanlineStatus pagespeed::image_compression::PngScanlineWriter::InitWithStatus ( const size_t  width,
const size_t  height,
PixelFormat  pixel_format 

Initialize the basic parameters for writing the image. Size of the image must be 1-by-1 or larger.

Implements pagespeed::image_compression::ScanlineWriterInterface.

The documentation for this class was generated from the following file: