Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PLPNGDecoder Class Reference

PNG file decoder. More...

#include <plpngdec.h>

Inheritance diagram for PLPNGDecoder:

Inheritance graph
[legend]
Collaboration diagram for PLPNGDecoder:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PLPNGDecoder ()
 Creates a decoder.
virtual ~PLPNGDecoder ()
 Destroys a decoder.

Protected Member Functions

virtual void DoDecode (PLBmp *pBmp, PLDataSource *pDataSrc)
 Main decoder routine.

Static Private Member Functions

void user_error_fn (png_structp png_ptr, png_const_charp error_msg)
void user_warning_fn (png_structp png_ptr, png_const_charp warning_msg)

Detailed Description

PNG file decoder.

Uses LibPng to do the actual decoding. PNG supports many pixel formats not supported by paintlib. These pixel formats are converted to the nearest paintlib equivalent. Images with less or more than 8 bits per channel are converted to 8 bits per channel. Images with 16-bit palettes or grayscale images with an alpha channel are returned as full 32-bit RGBA bitmaps.

Definition at line 31 of file plpngdec.h.


Constructor & Destructor Documentation

PLPNGDecoder::PLPNGDecoder  ) 
 

Creates a decoder.

Definition at line 27 of file plpngdec.cpp.

PLPNGDecoder::~PLPNGDecoder  )  [virtual]
 

Destroys a decoder.

Definition at line 35 of file plpngdec.cpp.


Member Function Documentation

void PLPNGDecoder::DoDecode PLBmp pBmp,
PLDataSource pDataSrc
[protected, virtual]
 

Main decoder routine.

Reads the header, creates the bitmap, reads the palette, and reads the image data.

Reimplemented from PLPicDecoder.

Definition at line 53 of file plpngdec.cpp.

References my_read_data(), NULL, PLASSERT, PLBYTE, and PLULONG.

Here is the call graph for this function:

void PLPNGDecoder::user_error_fn png_structp  png_ptr,
png_const_charp  error_msg
[static, private]
 

Definition at line 222 of file plpngdec.cpp.

References PL_ERRFORMAT_UNKNOWN, and raiseError().

Here is the call graph for this function:

void PLPNGDecoder::user_warning_fn png_structp  png_ptr,
png_const_charp  warning_msg
[static, private]
 

Definition at line 230 of file plpngdec.cpp.

References PLTRACE.


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 21:21:01 2004 for vuVolume by  doxygen 1.3.9.1