blip  0.1
PNGImageDecoder Class Reference

An ImageDecoder for PNG images. More...

#include <PNGImageDecoder.hpp>

Inheritance diagram for PNGImageDecoder:

Public Member Functions

 PNGImageDecoder (ccxx::DataReader *reader)
 Construct a new PNGImageDecoder that will read a PNG image from the given DataReader. More...
 
virtual ~PNGImageDecoder ()
 Destructor. More...
 
void decodeMetadata ()
 Decode the metadata for the image. More...
 
void decodeImage (Pixmap *pixmap)
 Decode the image itself. More...
 
Size getSize () const
 Get the size of the image, in pixels. More...
 

Protected Member Functions

virtual void readMetadata (ccxx::DataReader *reader)
 This method must be implemented to perform the image metadata decoding. More...
 
virtual void readPixmap (ccxx::DataReader *reader, Pixmap *pixmap)
 This method must be implemented to perform the image data decoding. More...
 
void setSize (const Size &size)
 This method should be called from readMetadata() to store the image size, once it has been determined. More...
 

Detailed Description

An ImageDecoder for PNG images.

Author
Mark Lindner

Constructor & Destructor Documentation

◆ PNGImageDecoder()

PNGImageDecoder ( ccxx::DataReader *  reader)

Construct a new PNGImageDecoder that will read a PNG image from the given DataReader.

◆ ~PNGImageDecoder()

~PNGImageDecoder ( )
virtual

Destructor.

Member Function Documentation

◆ decodeImage()

void decodeImage ( Pixmap pixmap)
inherited

Decode the image itself.

This method must be called after decodeMetadata().

Parameters
pixmapThe Pixmap in which to store the image data.
Exceptions
IOExceptionIf an I/O error occurs, or if the supplied Pixmap is too small to accommodate the image.

◆ decodeMetadata()

void decodeMetadata ( )
inherited

Decode the metadata for the image.

This method must be called before decodeImage().

Exceptions
IOExceptionIf an I/O error occurs.

◆ getSize()

Size getSize ( ) const
inlineinherited

Get the size of the image, in pixels.

This method will return a size of 0x0 if decodeMetadata() has not yet been called.

◆ readMetadata()

void readMetadata ( ccxx::DataReader *  reader)
protectedvirtual

This method must be implemented to perform the image metadata decoding.

Exceptions
IOExceptionIf an I/O error occurs.

Implements ImageDecoder.

◆ readPixmap()

void readPixmap ( ccxx::DataReader *  reader,
Pixmap pixmap 
)
protectedvirtual

This method must be implemented to perform the image data decoding.

Parameters
readerThe DataReader that the image is being read from.
pixmapThe Pixmap to store the image into.
Exceptions
IOExceptionIf an I/O error occurs.

Implements ImageDecoder.

◆ setSize()

void setSize ( const Size size)
inlineprotectedinherited

This method should be called from readMetadata() to store the image size, once it has been determined.


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