Logo Search packages:      
Sourcecode: paintlib version File versions

PLBmpDecoder Class Reference

#include <plbmpdec.h>

Inheritance diagram for PLBmpDecoder:

PLPicDecoder PLBmpInfo

List of all members.

Detailed Description

Windows bitmap file decoder. Decodes bitmap files (compressed and uncompressed) of all bit depths. Returns an 8 or 32 bpp bitmap.

Definition at line 25 of file plbmpdec.h.

Public Member Functions

virtual void AssertValid () const
void AsString (char *psz, int len) const
virtual void Close ()
int GetBitsPerPixel () const
int GetHeight () const
virtual void GetImage (PLBmp &Bmp)
 Fills the bitmap with the main image.
const PLPointGetResolution () const
const PLPointGetSize () const
int GetWidth () const
bool HasAlpha () const
bool IsGreyscale () const
virtual void MakeBmp (PLBmp *pBmp, int BPPWanted=0)
virtual void MakeBmpFromFile (const char *pszFName, 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 MakeBmpFromURL (const char *pszURL, PLBmp *pBmp, int BPPWanted=0, PLIProgressNotification *pProgNot=NULL)
virtual void Open (PLDataSource *pDataSrc)
 Opens the data source.
void OpenFile (const char *pszFName, PLIProgressNotification *pProgNot=NULL)
bool operator== (const PLBmpInfo &Other) const
 PLBmpDecoder ()
 Creates a decoder.
void SetDataSrc (PLDataSource *pDataSrc)
virtual ~PLBmpDecoder ()
 Destroys a decoder.

Static Public Member Functions

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

Protected Member Functions

PLBYTE ReadByte (PLDataSource *pDataSrc)
PLLONG ReadILong (PLDataSource *pDataSrc)
PLWORD ReadIWord (PLDataSource *pDataSrc)
PLLONG ReadMLong (PLDataSource *pDataSrc)
PLWORD ReadMWord (PLDataSource *pDataSrc)
void SetBmpInfo (const PLBmpInfo &SrcInfo)
void SetBmpInfo (const PLPoint &Size, int bpp, const PLPoint &Resolution, bool bAlphaChannel, bool bIsGreyscale)
PLBYTE * unpackPictRow (PLBYTE *pLineBuf, PLDataSource *pDataSrc, int Width, int rowBytes, int SrcBytes)

Protected Attributes

bool m_bAlphaChannel
bool m_bIsGreyscale
int m_bpp
PLPoint m_Resolution
PLPoint m_Size

Private Member Functions

void decode15bppLine (PLDataSource *pDataSrc, PLBmp *pBmp, PLBYTE *pDest)
void decode16bppLine (PLDataSource *pDataSrc, PLBmp *pBmp, PLBYTE *pDest)
void decode1bpp (PLDataSource *pDataSrc, PLBmp *pBmp)
void decode24bppLine (PLDataSource *pDataSrc, PLBmp *pBmp, PLBYTE *pDest)
void decode2Nibbles (PLBYTE *pDest, PLBYTE SrcByte)
void decode32bppLine (PLDataSource *pDataSrc, PLBmp *pBmp, PLBYTE *pDest)
void decode4bpp (PLDataSource *pDataSrc, PLBmp *pBmp)
void decode8bpp (PLDataSource *pDataSrc, PLBmp *pBmp)
void decodeHiColor (PLDataSource *pDataSrc, PLBmp *pBmp, WINBITMAPINFOHEADER *pBMI)
void decodeRLE4 (PLDataSource *pDataSrc, PLBmp *pBmp)
void decodeRLE8 (PLDataSource *pDataSrc, PLBmp *pBmp)
void decodeTrueColor (PLDataSource *pDataSrc, PLBmp *pBmp, int SrcBPP)
WINBITMAPINFOHEADER * getInfoHeader (PLDataSource *pDataSrc, PLPixel32 *Pal)
int readPalette (WINBITMAPINFOHEADER *pBMI, PLDataSource *pDataSrc, PLPixel32 *pPal, int RGBSize)

Private Attributes

PLPixel32 m_Pal [256]

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index