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

PLPPMDecoder Class Reference

Portable Pixmap file decoder. Delivers a 24 bit true color image. More...

#include <plppmdec.h>

Inheritance diagram for PLPPMDecoder:

Inheritance graph
[legend]
Collaboration diagram for PLPPMDecoder:

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

Protected Member Functions

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

Private Member Functions

void readPpmHeader (PPMHEADER *pPpmHead, PLDataSource *pDataSrc)
int readASCIIDecimal (PLDataSource *pDataSrc)
void skipComment (PLDataSource *pDataSrc)
void skipPpmASCIISeparators (PLDataSource *pDataSrc)
PLBYTEreadASCIILine (PLDataSource *pDataSrc)
void readImage (PPMHEADER *pPpmHead, PLBmp *pBmp, PLDataSource *pDataSrc)
void readData (PPMHEADER *pPpmHead, PLBmp *pBmp, PLDataSource *pDataSrc)
void expandASCIILine (PLPixel32 *pDest, int MaxGrayValue, int Width, PLDataSource *pDataSrc)
void expandByteLine (PLPixel32 *pDest, int MaxGrayValue, int Width, PLDataSource *pDataSrc)
PLPixel32 readASCIIPixel32 (int MaxGrayValue, PLDataSource *pDataSrc)

Private Attributes

PLBYTE m_LastByte
bool m_UseLastByte

Detailed Description

Portable Pixmap file decoder. Delivers a 24 bit true color image.

Definition at line 29 of file plppmdec.h.


Constructor & Destructor Documentation

PLPPMDecoder::PLPPMDecoder  ) 
 

Creates a decoder.

Definition at line 25 of file plppmdec.cpp.

PLPPMDecoder::~PLPPMDecoder  )  [virtual]
 

Destroys a decoder.

Definition at line 31 of file plppmdec.cpp.


Member Function Documentation

void PLPPMDecoder::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 36 of file plppmdec.cpp.

References _PpmHeader::ImageHeight, _PpmHeader::ImageWidth, and PPMHEADER.

void PLPPMDecoder::expandASCIILine PLPixel32 pDest,
int  MaxGrayValue,
int  Width,
PLDataSource pDataSrc
[private]
 

Definition at line 225 of file plppmdec.cpp.

void PLPPMDecoder::expandByteLine PLPixel32 pDest,
int  MaxGrayValue,
int  Width,
PLDataSource pDataSrc
[private]
 

Definition at line 241 of file plppmdec.cpp.

References PLBYTE, and PLPixel32::Set().

Here is the call graph for this function:

int PLPPMDecoder::readASCIIDecimal PLDataSource pDataSrc  )  [private]
 

Definition at line 143 of file plppmdec.cpp.

References m_LastByte, and PLPicDecoder::ReadByte().

Here is the call graph for this function:

PLBYTE * PLPPMDecoder::readASCIILine PLDataSource pDataSrc  )  [private]
 

Definition at line 114 of file plppmdec.cpp.

References byte, PL_ERRFORMAT_UNKNOWN, PLBYTE, PLPicDecoder::raiseError(), and PLPicDecoder::ReadByte().

Here is the call graph for this function:

PLPixel32 PLPPMDecoder::readASCIIPixel32 int  MaxGrayValue,
PLDataSource pDataSrc
[private]
 

Definition at line 273 of file plppmdec.cpp.

References PLBYTE, and PLPixel32::Set().

Here is the call graph for this function:

void PLPPMDecoder::readData PPMHEADER pPpmHead,
PLBmp pBmp,
PLDataSource pDataSrc
[private]
 

Definition at line 195 of file plppmdec.cpp.

References PPMHEADER.

void PLPPMDecoder::readImage PPMHEADER pPpmHead,
PLBmp pBmp,
PLDataSource pDataSrc
[private]
 

Definition at line 178 of file plppmdec.cpp.

References PL_ERRFORMAT_UNKNOWN, PPM_P3, PPM_P6, PPMHEADER, and raiseError().

Here is the call graph for this function:

void PLPPMDecoder::readPpmHeader PPMHEADER pPpmHead,
PLDataSource pDataSrc
[private]
 

Definition at line 54 of file plppmdec.cpp.

References PL_ERRFORMAT_UNKNOWN, PPMHEADER, and raiseError().

Here is the call graph for this function:

void PLPPMDecoder::skipComment PLDataSource pDataSrc  )  [private]
 

Definition at line 158 of file plppmdec.cpp.

References m_LastByte, and PLPicDecoder::ReadByte().

Here is the call graph for this function:

void PLPPMDecoder::skipPpmASCIISeparators PLDataSource pDataSrc  )  [private]
 

Definition at line 167 of file plppmdec.cpp.

References m_LastByte, and PLPicDecoder::ReadByte().

Here is the call graph for this function:


Member Data Documentation

PLBYTE PLPPMDecoder::m_LastByte [private]
 

Definition at line 90 of file plppmdec.h.

Referenced by readASCIIDecimal(), skipComment(), and skipPpmASCIISeparators().

bool PLPPMDecoder::m_UseLastByte [private]
 

Definition at line 91 of file plppmdec.h.


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