#include <plpicdec.h>
Inheritance diagram for PLPicDecoder:
Public Member Functions | |
PLPicDecoder () | |
Empty constructor. | |
virtual | ~PLPicDecoder () |
Destructor. Frees memory allocated. | |
virtual void | MakeBmpFromFile (const char *pszFName, PLBmp *pBmp, int BPPWanted=0, PLIProgressNotification *pProgNot=NULL) |
Decodes a picture in a file and stores the results in pBmp. | |
virtual void | MakeBmpFromMemory (unsigned char *ucMemSrc, int MemSrcSize, PLBmp *pBmp, int BPPWanted=0, PLIProgressNotification *pProgNot=NULL) |
Decodes a picture from a memory location which directly resembles the image file as it would be on disc. | |
virtual void | MakeBmp (PLDataSource *pDataSrc, PLBmp *pBmp, int BPPWanted=0) |
Decodes a picture by getting the encoded data from pDataSrc. | |
void | OpenFile (const char *pszFName, PLIProgressNotification *pProgNot=NULL) |
virtual void | Close () |
Static Public Member Functions | |
void | SetTraceConfig (int Level, char *pszFName) |
Sets the amount and destination of debug traces output by the debug version. | |
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 | |
virtual void | DoDecode (PLBmp *pBmp, PLDataSource *pDataSrc) |
Implements the actual decoding process. | |
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 | |
PLDataSource * | m_pDataSrc |
Static Private Attributes | |
int | m_TraceLevel = 0 |
char * | m_pszTraceFName = NULL |
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.
|
Empty constructor. The actual initialization takes place in a derived class. Definition at line 36 of file plpicdec.cpp. |
|
Destructor. Frees memory allocated.
Definition at line 44 of file plpicdec.cpp. |
|
Definition at line 239 of file plpicdec.cpp. References PLFileSource::Close(). |
Here is the call graph for this function:
|
Implements the actual decoding process. Uses variables local to the object to retrieve and store the data. Implemented in derived classes. This routine should never be called. It's here so derived classes can override MakeDIB directly if they want to. (CAnyDecoder does this). Reimplemented in PLBmpDecoder, PLGIFDecoder, PLJPEGDecoder, PLPCXDecoder, PLPGMDecoder, PLPictDecoder, PLPNGDecoder, PLPPMDecoder, PLTGADecoder, PLTIFFDecoder, and PLTIFFDecoderEx. Definition at line 289 of file plpicdec.cpp. References PLASSERT. |
|
Decodes a picture by getting the encoded data from pDataSrc. 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. Reimplemented in PLAnyPicDecoder. Definition at line 162 of file plpicdec.cpp. References PLBmp::CreateCopy(), and PL_ERRFORMAT_NOT_SUPPORTED. Referenced by PLAnyPicDecoder::MakeBmp(). |
Here is the call graph for this function:
|
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. Definition at line 53 of file plpicdec.cpp. |
|
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. Definition at line 120 of file plpicdec.cpp. References PLMemSource::Close(), PLMemSource::Open(), and raiseError(). |
Here is the call graph for this function:
|
Definition at line 207 of file plpicdec.cpp. References PLFileSource::Open(), and raiseError(). |
Here is the call graph for this function:
|
|
|
Definition at line 229 of file plpicdec.h. References PLBYTE. |
|
Definition at line 210 of file plpicdec.h. References PLBYTE. |
|
Definition at line 237 of file plpicdec.h. References PLBYTE. |
|
Definition at line 220 of file plpicdec.h. References PLBYTE. |
|
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: Definition at line 182 of file plpicdec.cpp. References PLASSERT. Referenced by PLPicEncoder::SetTraceConfig(). |
|
Called to output status messages to the current debug console.
Definition at line 261 of file plpicdec.cpp. References PLTRACE. Referenced by PLPCXDecoder::DoDecode(), PLTIFFDecoder::doLoColor(), PLAnyPicDecoder::MakeBmp(), PLPicEncoder::Trace(), PLTIFFDecoder::Win32ErrorHandler(), and PLTIFFDecoder::Win32WarningHandler(). |
|
Definition at line 303 of file plpicdec.cpp. References PLBYTE, and PLFileSource::ReadNBytes(). |
Here is the call graph for this function:
|
Definition at line 185 of file plpicdec.h. |
|
Definition at line 32 of file plpicdec.cpp. |
|
Definition at line 31 of file plpicdec.cpp. |