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::ScanlineToFrameWriterAdapter Class Reference

#include "scanline_interface_frame_adapter.h"

Inheritance diagram for pagespeed::image_compression::ScanlineToFrameWriterAdapter:
pagespeed::image_compression::MultipleFrameWriter

Public Member Functions

 ScanlineToFrameWriterAdapter (ScanlineWriterInterface *scanline_writer, MessageHandler *handler)
 Acquires ownership of 'scanline_writer'.
 
virtual ScanlineStatus Initialize (const void *config, GoogleString *out)
 
virtual ScanlineStatus PrepareImage (const ImageSpec *image_spec)
 
virtual ScanlineStatus PrepareNextFrame (const FrameSpec *frame_spec)
 
virtual ScanlineStatus WriteNextScanline (const void *scanline_bytes)
 
virtual ScanlineStatus FinalizeWrite ()
 Finalizes the image once all the frames have been written.
 
- 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)
 

Detailed Description

The class ScanlineToFrameWriterAdapter takes ownership of a ScanlineWriterInterface and exposes MultipleFrameWriter methods.

Member Function Documentation

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

Initializes the writer to use the format-specific configuration in 'config' to write an image to 'out'. It is up to the client to ensure 'config' points to data of the right type for the given child class it invokes.

Implements pagespeed::image_compression::MultipleFrameWriter.

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

Prepares to write an image with the characteristics in 'image_spec'.

Implements pagespeed::image_compression::MultipleFrameWriter.

virtual ScanlineStatus pagespeed::image_compression::ScanlineToFrameWriterAdapter::PrepareNextFrame ( const FrameSpec frame_spec)
virtual

Prepares to write scanlines to the frame after the current one by setting its properties to 'frame_spec'. Must be called before writing to the first frame.

Implements pagespeed::image_compression::MultipleFrameWriter.

virtual ScanlineStatus pagespeed::image_compression::ScanlineToFrameWriterAdapter::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: