An ImageDecoder for PNG images.
More...
#include <PNGImageDecoder.hpp>
|
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...
|
|
An ImageDecoder for PNG images.
- Author
- Mark Lindner
◆ PNGImageDecoder()
Construct a new PNGImageDecoder that will read a PNG image from the given DataReader.
◆ ~PNGImageDecoder()
◆ decodeImage()
void decodeImage |
( |
Pixmap * |
pixmap | ) |
|
|
inherited |
Decode the image itself.
This method must be called after decodeMetadata().
- Parameters
-
pixmap | The Pixmap in which to store the image data. |
- Exceptions
-
IOException | If an I/O error occurs, or if the supplied Pixmap is too small to accommodate the image. |
◆ decodeMetadata()
Decode the metadata for the image.
This method must be called before decodeImage().
- Exceptions
-
IOException | If an I/O error occurs. |
◆ getSize()
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
-
IOException | If 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
-
reader | The DataReader that the image is being read from. |
pixmap | The Pixmap to store the image into. |
- Exceptions
-
IOException | If 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: