Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members

PLPicDecoder Class Reference

#include <plpicdec.h>

Inheritance diagram for PLPicDecoder:

PLBmpInfo PLAnyPicDecoder PLBmpDecoder PLGIFDecoder PLIFF85Decoder PLJPEGDecoder PLPCXDecoder PLPGMDecoder PLPictDecoder PLPNGDecoder PLPPMDecoder PLPSDDecoder PLSGIDecoder PLTGADecoder PLTIFFDecoder List of all members.

Public Member Functions

 PLPicDecoder ()
virtual ~PLPicDecoder ()
 Destructor. Frees memory allocated.

virtual void MakeBmpFromFile (const char *pszFName, PLBmp *pBmp, int BPPWanted=0, PLIProgressNotification *pProgNot=NULL)
virtual void MakeBmpFromURL (const char *pszURL, PLBmp *pBmp, int BPPWanted=0, PLIProgressNotification *pProgNot=NULL)
virtual void MakeBmpFromMemory (unsigned char *ucMemSrc, int MemSrcSize, PLBmp *pBmp, int BPPWanted=0, PLIProgressNotification *pProgNot=NULL)
virtual void MakeBmp (PLBmp *pBmp, int BPPWanted=0)
void OpenFile (const char *pszFName, PLIProgressNotification *pProgNot=NULL)
virtual void Close ()
virtual void Open (PLDataSource *pDataSrc)=0
virtual void GetImage (PLBmp &Bmp)=0
void SetDataSrc (PLDataSource *pDataSrc)

Static Public Member Functions

void SetTraceConfig (int Level, char *pszFName)
void raiseError (int Code, char *pszErr)
void Trace (int TraceLevel, const char *pszMessage)
 Called to output status messages to the current debug console.


Protected Member Functions

PLBYTE * unpackPictRow (PLBYTE *pLineBuf, PLDataSource *pDataSrc, int Width, int rowBytes, int SrcBytes)
PLBYTE ReadByte (PLDataSource *pDataSrc)
PLWORD ReadIWord (PLDataSource *pDataSrc)
PLWORD ReadMWord (PLDataSource *pDataSrc)
PLLONG ReadILong (PLDataSource *pDataSrc)
PLLONG ReadMLong (PLDataSource *pDataSrc)

Protected Attributes

PLDataSourcem_pDataSrc

Detailed Description

PLPicDecoder is an abstract base class. It defines common routines for all decoders. Decoders for specific file formats can be derived from this class. Objects of this class interact with a PLDataSource to decode bitmaps.

Definition at line 26 of file plpicdec.h.


Constructor & Destructor Documentation

PLPicDecoder::PLPicDecoder  ) 
 

Empty constructor. The actual initialization takes place in a derived class.


Member Function Documentation

virtual void PLPicDecoder::MakeBmp PLBmp pBmp,
int  BPPWanted = 0
[virtual]
 

Stores the results in pBmp. BPPWanted is the number of bits per pixel in the bitmap returned. Valid values for BPPWanted are 8, 24, and 0. 0 means 'keep the input format'. Decoding a true-color image to 8 bpp is not supported.

virtual void PLPicDecoder::MakeBmpFromFile const char *  pszFName,
PLBmp pBmp,
int  BPPWanted = 0,
PLIProgressNotification pProgNot = NULL
[virtual]
 

Decodes a picture in a file and stores the results in pBmp. BPPWanted is the number of bits per pixel in the bitmap returned. Valid values for BPPWanted are 8, 24, and 0. 0 means 'keep the input format'. Decoding a true-color image to 8 bpp is not supported. As an exception, BPPWanted can be 1 for b/w tiff files.

virtual void PLPicDecoder::MakeBmpFromMemory unsigned char *  ucMemSrc,
int  MemSrcSize,
PLBmp pBmp,
int  BPPWanted = 0,
PLIProgressNotification pProgNot = NULL
[virtual]
 

Decodes a picture from a memory location which directly resembles the image file as it would be on disc. The result is stored in pBmp. BPPWanted is the number of bits per pixel in the bitmap returned. Valid values for BPPWanted are 8, 24, and 0. 0 means 'keep the input format'. Decoding a true-color image to 8 bpp is not supported. As an exception, BPPWanted can be 1 for b/w tiff files.

virtual void PLPicDecoder::MakeBmpFromURL const char *  pszURL,
PLBmp pBmp,
int  BPPWanted = 0,
PLIProgressNotification pProgNot = NULL
[virtual]
 

BPPWanted is the number of bits per pixel in the bitmap returned. Valid values for BPPWanted are 8, 24, and 0. 0 means 'keep the input format'. Decoding a true-color image to 8 bpp is not supported. As an exception, BPPWanted can be 1 for b/w tiff files.

void PLPicDecoder::OpenFile const char *  pszFName,
PLIProgressNotification pProgNot = NULL
 

Decodes a picture by getting the encoded data from pDataSrc. Open should be called before, close after this routine is called.

void PLPicDecoder::SetTraceConfig int  Level,
char *  pszFName
[static]
 

Sets the amount and destination of debug traces output by the debug version. pszFName contains either a valid file name or is NULL. If it contains a file name, this file is used to store debug information. If pszFName is NULL, the destination is either the MSVC debug console or stderr depending on the version of the library. Valid values for Level are:

0: Trace only errors.
1: Trace top-level calls.
2: Trace picture format information
3: Trace all miscellaneous info.

The trace configuration is global to all decoders.


The documentation for this class was generated from the following file:
Generated on Sun Jun 6 13:42:23 2004 for paintlib by doxygen 1.3.2