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

#include "webp_optimizer.h"

Inheritance diagram for pagespeed::image_compression::WebpScanlineReader:
pagespeed::image_compression::ScanlineReaderInterface

Public Member Functions

 WebpScanlineReader (MessageHandler *handler)
 
virtual bool Reset ()
 Reset the scanline reader to its initial state.
 
virtual ScanlineStatus InitializeWithStatus (const void *image_buffer, size_t buffer_length)
 
virtual ScanlineStatus ReadNextScanlineWithStatus (void **out_scanline_bytes)
 
virtual size_t GetBytesPerScanline ()
 Return the number of bytes in a row (without padding).
 
virtual bool HasMoreScanLines ()
 Returns true if there are more scanlines to read.
 
virtual PixelFormat GetPixelFormat ()
 Returns the pixel format that need to be used by writer.
 
virtual size_t GetImageHeight ()
 Returns the height of the image.
 
virtual size_t GetImageWidth ()
 Returns the width of the image.
 
virtual bool IsProgressive ()
 WebP does not have progressive mode.
 
- 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)
 

Detailed Description

WebpScanlineReader decodes WebP images. It returns a scanline (a row of pixels) each time it is called. The output format is RGB_888 if the input image does not have alpha channel, or RGBA_8888 otherwise. Animated WebP is not supported.

Member Function Documentation

virtual ScanlineStatus pagespeed::image_compression::WebpScanlineReader::InitializeWithStatus ( const void *  image_buffer,
size_t  buffer_length 
)
virtual

Initialize the reader with the given image stream. Note that image_buffer must remain unchanged until the first call to ReadNextScanline().

Implements pagespeed::image_compression::ScanlineReaderInterface.

virtual ScanlineStatus pagespeed::image_compression::WebpScanlineReader::ReadNextScanlineWithStatus ( void **  out_scanline_bytes)
virtual

Return the next row of pixels. The entire image is decoded the first time ReadNextScanline() is called, but only one scanline is returned for each call.

Implements pagespeed::image_compression::ScanlineReaderInterface.


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