Logo Search packages:      
Sourcecode: paintlib version File versions

PLPictDecoder Class Reference

#include <plpictdec.h>

Inheritance diagram for PLPictDecoder:

PLPicDecoder PLBmpInfo

List of all members.


Detailed Description

This class decodes macintosh PICT files with 1,2,4,8,16 and 32 bits per pixel as well as PICT/JPEG. If an alpha channel is present in a 32-bit-PICT, it is decoded as well. The PICT format is a general picture file format and can contain a lot of other elements besides bitmaps. These elements are ignored.

Definition at line 28 of file plpictdec.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 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)
void OpenFile (const char *pszFName, PLIProgressNotification *pProgNot=NULL)
bool operator== (const PLBmpInfo &Other) const
 PLPictDecoder (PLJPEGDecoder *pJPEGDecoder)
void SetDataSrc (PLDataSource *pDataSrc)
virtual ~PLPictDecoder ()
 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
PLDataSourcem_pDataSrc
PLPoint m_Resolution
PLPoint m_Size

Private Types

enum  PICTType {
  none, op9a, jpeg, pixmap,
  bitmap
}

Private Member Functions

void bitsRect (PLDataSource *pDataSrc)
void bitsRegion (PLDataSource *pDataSrc)
void clip (PLDataSource *pDataSrc)
void DecodeBitmap (PLBmp *pBmp, PLDataSource *pDataSrc)
void DecodeJPEG (PLBmp *pBmp, PLDataSource *pDataSrc)
void DecodeOp9a (PLBmp *pBmp, PLDataSource *pDataSrc)
void DecodePixmap (PLBmp *pBmp, PLDataSource *pDataSrc)
void doBitmap (PLDataSource *pDataSrc)
void doPixmap (PLDataSource *pDataSrc)
void dumpRect (char *psz, MacRect *pr)
void expandBuf (PLBYTE *pDestBuf, PLBYTE *pSrcBuf, int Width, int bpp)
void expandBuf8 (PLBYTE *pDestBuf, PLBYTE *pSrcBuf, int Width, int bpp)
void headerOp (PLDataSource *pDataSrc)
void interpretOpcodes (PLDataSource *pDataSrc, int &Version)
void jpegOp (PLDataSource *pDataSrc)
void longComment (PLDataSource *pDataSrc)
void opcode9a (PLDataSource *pDataSrc)
void pixPat (PLDataSource *pDataSrc)
void readColourTable (PLWORD *pNumColors, PLDataSource *pDataSrc, PLPixel32 *pPal)
void readHeader (PLDataSource *pDataSrc, int &Version)
PLWORD readOpcode (int Version, PLDataSource *pDataSrc)
void readPixmap (MacpixMap *pPixMap, PLDataSource *pDataSrc)
void readRect (MacRect *pr, PLDataSource *pDataSrc)
void setBmpInfo (MacpixMap PixMap)
void skipBits (MacRect *pBounds, PLWORD rowBytes, int pixelSize, PLDataSource *pDataSrc)
void skipPolyOrRegion (PLDataSource *pDataSrc)
void tracePixMapHeader (int Level, MacpixMap *pPixMap)
void unpack32bits (MacRect *pBounds, PLWORD rowBytes, int NumBitPlanes, PLBmp *pBmp, PLDataSource *pDataSrc)
void unpack8bits (MacRect *pBounds, PLWORD rowBytes, PLBmp *pBmp, PLDataSource *pDataSrc)
void unpackbits (MacRect *pBounds, PLWORD rowBytes, int pixelSize, PLBmp *pBmp, PLDataSource *pDataSrc)

Private Attributes

bool m_bIsRegion
MacRect m_Bounds
PICTType m_PictType
MacpixMap m_PixMap
PLJPEGDecoderm_pJPEGDecoder
int m_rowBytes

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

Generated by  Doxygen 1.6.0   Back to index