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::WebpFrameWriter Class Reference
Inheritance diagram for pagespeed::image_compression::WebpFrameWriter:
pagespeed::image_compression::MultipleFrameWriter

Public Member Functions

 WebpFrameWriter (MessageHandler *handler)
 
virtual ScanlineStatus Initialize (const void *config, GoogleString *out)
 
virtual ScanlineStatus PrepareImage (const ImageSpec *image_spec)
 
virtual ScanlineStatus PrepareNextFrame (const FrameSpec *frame_spec)
 frame_spec must remain valid while the frame is being written.
 
virtual ScanlineStatus WriteNextScanline (const void *scanline_bytes)
 
virtual ScanlineStatus FinalizeWrite ()
 
- Public Member Functions inherited from pagespeed::image_compression::MultipleFrameWriter
 MultipleFrameWriter (MessageHandler *handler)
 
MessageHandlermessage_handler () const
 
bool Initialize (const void *config, GoogleString *out, ScanlineStatus *status)
 
bool PrepareImage (const ImageSpec *image_spec, ScanlineStatus *status)
 
bool PrepareNextFrame (const FrameSpec *frame_spec, ScanlineStatus *status)
 
bool WriteNextScanline (const void *scanline_bytes, ScanlineStatus *status)
 
bool FinalizeWrite (ScanlineStatus *status)
 

Member Function Documentation

virtual ScanlineStatus pagespeed::image_compression::WebpFrameWriter::FinalizeWrite ( )
virtual

Note that even after WriteNextScanline() has been called, Initialize() and FinalizeWrite() may be called repeatedly to write the image with, say, different configs.

Implements pagespeed::image_compression::MultipleFrameWriter.

virtual ScanlineStatus pagespeed::image_compression::WebpFrameWriter::Initialize ( const void *  config,
GoogleString out 
)
virtual

Sets the WebP configuration to be 'config', which should be a WebpConfiguration* and should not be NULL.

Implements pagespeed::image_compression::MultipleFrameWriter.

virtual ScanlineStatus pagespeed::image_compression::WebpFrameWriter::PrepareImage ( const ImageSpec image_spec)
virtual

image_spec must remain valid for the lifetime of WebpFrameWriter.

Implements pagespeed::image_compression::MultipleFrameWriter.

virtual ScanlineStatus pagespeed::image_compression::WebpFrameWriter::WriteNextScanline ( const void *  scanline_bytes)
virtual

Writes 'scanline_bytes' to the next scanline of the current frame. The scanline's width in pixels and pixel format (and thus, its width in bytes) are as set in the preceding call to PrepareNextFrame(); that many bytes from '*scanline_bytes' are read.

Implements pagespeed::image_compression::MultipleFrameWriter.


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