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

PLBmp Class Reference

Device- and OS-independent bitmap class. More...

#include <plbitmap.h>

Inheritance diagram for PLBmp:

Inheritance graph
[legend]
Collaboration diagram for PLBmp:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PLBmp ()
 Empty constructor.
virtual ~PLBmp ()
 Empty destructor.
PLBmpoperator= (PLBmp const &Orig)
 Assignment operator.
bool const operator== (PLBmp const &Other)
 Test for equality.
virtual void Create (PLLONG Width, PLLONG Height, PLWORD BitsPerPixel, bool bAlphaChannel, const PLPoint &Resolution=PLPoint(0, 0))
 Creates a new empty bitmap.
void CreateCopy (const PLBmp &rSrPLBmp, int BPPWanted=0)
 Creates a copy of rSrPLBmp, converting color depth if nessesary.
void CreateFilteredCopy (PLBmp &rSrPLBmp, const PLFilter &rFilter)
 Creates a copy of rSrPLBmp, applying rFilter on the way.
void SetQuantizationMode (int DitherType, int DitherPaletteType)
 Sets quality of conversion to 8 bpp.
void SetGrayPalette ()
 Fills the color table with a grayscale palette.
void SetPalette (PLPixel32 *pPal)
 Sets the color table to pPal. The contents or pPal are copied.
void SetPaletteEntry (PLBYTE Entry, PLBYTE r, PLBYTE g, PLBYTE b, PLBYTE a)
 Sets one entry in the color table.
void SetPaletteEntry (PLBYTE Entry, PLPixel32 Value)
 Sets one entry in the color table.
void SetAlphaChannel (PLBmp *pAlphaBmp)
 Replaces the alpha channel of the bitmap with a new one.
void ApplyFilter (const PLFilter &Filter)
 Applies a filter to the bitmap.
void SetPixel (int x, int y, PLPixel32 pixel)
 Slow but simple function to set a single pixel. 32 bpp only.
PLPixel32 GetPixel (int x, int y) const
 Slow but simple function to get a single pixel. 32 bpp only.
PLBYTE FindNearestColor (PLPixel32 cr)
 Find the nearest color to cr in the palette used by this bitmap Only works for 8 bpp bitmaps.
int GetWidth () const
int GetHeight () const
virtual long GetMemUsed ()=0
int GetNumColors ()
int GetBitsPerPixel () const
bool HasAlpha () const
void SetHasAlpha (bool b)
virtual long GetBytesPerLine ()=0
 Returns number of bytes used per line.
PLPixel32GetPalette () const
 Returns the address of the color table of the bitmap or NULL if no color table exists.
PLBYTE ** GetLineArray () const
 Returns pointer to an array containing the starting addresses of the bitmap lines.
PLPixel32 ** GetLineArray32 () const
 Returns pointer to an array containing the starting addresses of the bitmap lines.
PLPixel24 ** GetLineArray24 () const
 Returns pointer to an array containing the starting addresses of the bitmap lines.
virtual void Lock (bool bReadable, bool bWriteable)
 Locks bitmap.
virtual void Unlock ()
 Unlocks the Bitmap surface.
bool IsLocked () const
bool AlmostEqual (const PLBmp &Bmp, int epsilon) const
const PLPointGetResolution () const
 Gets the bitmap resolution in pixels per inch.
void SetResolution (const PLPoint &Resolution)
 Sets the bitmap resolution in pixels per inch.

Protected Member Functions

virtual void internalCreate (PLLONG Width, PLLONG Height, PLWORD BitsPerPixel, bool bAlphaChannel)=0
 Create a new bitmap with uninitialized bits.
virtual void freeMembers ()=0
 Delete memory allocated by member variables.
virtual void initLineArray ()=0
 Initialize internal table of line addresses.
void internalCopy (const PLBmp &rSrPLBmp)
 Creates a new PLBmp as copy of rSrPLBmp.
void initLocals (PLLONG Width, PLLONG Height, PLWORD BitsPerPixel, bool bAlphaChannel)
 Can be called from internalCreate() to initialize object state.
void create8BPPCopy (const PLBmp &rSrPLBmp)
void create1BPPCopy (const PLBmp &rSrPLBmp)

Protected Attributes

int m_Width
int m_Height
PLWORD m_bpp
PLPoint m_Resolution
PLPixel32m_pClrTab
bool m_bAlphaChannel
PLBYTE ** m_pLineArray
int m_LockCount
int m_DitherType
int m_DitherPaletteType

Detailed Description

Device- and OS-independent bitmap class.

Manipulates uncompressed bitmaps of all color depths.

This class is an abstract base class. It exists to define a format-independent interface for bitmap manipulation and to provide common routines. Derived classes must support at least the color depths 1, 8 and 32 bpp. PLBmp defines a public interface for general use and a protected interface for use by derived classes.

For 32 bpp, alpha channel information is stored in one byte (PL_RGBA_ALPHA) of each 4-byte pixel. To allow for optimizations when no alpha channel is present, a flag is set whenever the alpha information is valid. The complete alpha channel of a bitmap can be replaced by a different one by calling SetAlphaChannel(). A 0 in an alpha channel entry is completely transparent; a 255 is completely opaque.

Definition at line 39 of file plbitmap.h.


Constructor & Destructor Documentation

PLBmp::PLBmp  ) 
 

Empty constructor.

Constructors in derived classes create a small empty bitmap to ensure that the object is always in a sane state.

Definition at line 30 of file plbitmap.cpp.

References PLDTH_NONE, and PLDTHPAL_DEFAULT.

PLBmp::~PLBmp  )  [virtual]
 

Empty destructor.

Definition at line 41 of file plbitmap.cpp.

References PLASSERT.


Member Function Documentation

bool PLBmp::AlmostEqual const PLBmp Bmp,
int  epsilon
const
 

Definition at line 362 of file plbitmap.cpp.

References linalg::abs(), PL_RGBA_BLUE, PL_RGBA_GREEN, PL_RGBA_RED, PLASSERT, and PLBYTE.

Here is the call graph for this function:

void PLBmp::ApplyFilter const PLFilter Filter  ) 
 

Applies a filter to the bitmap.

Definition at line 320 of file plbitmap.cpp.

Referenced by PLFilterFill::ApplyInPlace().

void PLBmp::Create PLLONG  Width,
PLLONG  Height,
PLWORD  BitsPerPixel,
bool  bAlphaChannel,
const PLPoint Resolution = PLPoint(0, 0)
[virtual]
 

Creates a new empty bitmap.

Memory for the bits is allocated but not initialized. Previous contents of the bitmap object are discarded. If bAlphaChannel is true, the bitmap is assumed to contain a valid alpha channel.

Definition at line 238 of file plbitmap.cpp.

References freeMembers(), internalCreate(), m_Resolution, PLASSERT_VALID, PLLONG, and PLWORD.

Referenced by PLFilterVideoInvert::Apply(), PLFilterThreshold::Apply(), PLFilterResizeHamming::Apply(), PLFilterResizeGaussian::Apply(), PLFilterResizeBox::Apply(), PLFilterResizeBilinear::Apply(), PLFilterQuantize::Apply(), PLFilterMirror::Apply(), PLFilterLightness::Apply(), PLFilterIntensity::Apply(), PLFilterGrayscale::Apply(), PLFilterGetAlpha::Apply(), PLFilterFlip::Apply(), PLFilterCrop::Apply(), PLFilterContrast::Apply(), CreateCopy(), PLPCXDecoder::DoDecode(), PLGIFDecoder::DoDecode(), PLTIFFDecoder::doHiColor(), and PLTIFFDecoder::doLoColor().

Here is the call graph for this function:

void PLBmp::create1BPPCopy const PLBmp rSrPLBmp  )  [protected]
 

Definition at line 524 of file plbitmap.cpp.

References GetBitsPerPixel(), GetBytesPerLine(), GetHeight(), GetLineArray(), GetPalette(), GetWidth(), Lock(), PLBYTE, SetPaletteEntry(), and Unlock().

Referenced by CreateCopy().

Here is the call graph for this function:

void PLBmp::create8BPPCopy const PLBmp rSrPLBmp  )  [protected]
 

Definition at line 478 of file plbitmap.cpp.

References PLFilterQuantize::Apply(), GetBitsPerPixel(), GetHeight(), GetLineArray(), GetPalette(), GetWidth(), Lock(), m_DitherPaletteType, m_DitherType, PL_RGBA_BLUE, PL_RGBA_GREEN, PL_RGBA_RED, PLBYTE, SetPaletteEntry(), and Unlock().

Referenced by CreateCopy().

Here is the call graph for this function:

void PLBmp::CreateCopy const PLBmp rSrPLBmp,
int  BPPWanted = 0
 

Creates a copy of rSrPLBmp, converting color depth if nessesary.

Supports 1, 8 and 32 BPP. Alpha channel information is preserved.

Definition at line 150 of file plbitmap.cpp.

References Create(), create1BPPCopy(), create8BPPCopy(), createTrueColorCopy(), freeMembers(), GetBitsPerPixel(), GetHeight(), GetResolution(), GetWidth(), HasAlpha(), internalCopy(), PLASSERT, PLASSERT_VALID, and SetResolution().

Referenced by PLPicDecoder::MakeBmp().

Here is the call graph for this function:

void PLBmp::CreateFilteredCopy PLBmp rSrPLBmp,
const PLFilter rFilter
 

Creates a copy of rSrPLBmp, applying rFilter on the way.

Depending on the filter called, this is often much faster than CreateCopy() followed by ApplyFilter().

Definition at line 204 of file plbitmap.cpp.

References PLFilter::Apply(), and PLASSERT_VALID.

Here is the call graph for this function:

PLBYTE PLBmp::FindNearestColor PLPixel32  cr  ) 
 

Find the nearest color to cr in the palette used by this bitmap Only works for 8 bpp bitmaps.

Definition at line 340 of file plbitmap.cpp.

References PLPixel32::BoxDist(), GetNumColors(), GetPalette(), PLASSERT, and PLBYTE.

Here is the call graph for this function:

virtual void PLBmp::freeMembers  )  [protected, pure virtual]
 

Delete memory allocated by member variables.

Implemented in PLAnyBmp.

Referenced by Create(), and CreateCopy().

int PLBmp::GetBitsPerPixel  )  const [inline]
 

Definition at line 408 of file plbitmap.h.

References PLASSERT_VALID.

Referenced by PLFilterVideoInvert::Apply(), PLFilterThreshold::Apply(), PLFilterResizeHamming::Apply(), PLFilterResizeGaussian::Apply(), PLFilterResizeBox::Apply(), PLFilterResizeBilinear::Apply(), PLFilterQuantize::Apply(), PLFilterMirror::Apply(), PLFilterLightness::Apply(), PLFilterIntensity::Apply(), PLFilterGrayscale::Apply(), PLFilterGetAlpha::Apply(), PLFilterFlip::Apply(), PLFilterCrop::Apply(), PLFilterContrast::Apply(), PLFilterPixel< PixelC, PixelOp >::ApplyInPlace(), create1BPPCopy(), create8BPPCopy(), CreateCopy(), createTrueColorCopy(), PLPNGEncoder::DoEncode(), PLTIFFEncoder::DoTiffEncode(), EncodeTransformation(), GetPixel(), internalCopy(), SetAlphaChannel(), and SetPixel().

virtual long PLBmp::GetBytesPerLine  )  [pure virtual]
 

Returns number of bytes used per line.

Implemented in PLAnyBmp.

Referenced by create1BPPCopy(), and internalCopy().

int PLBmp::GetHeight  )  const [inline]
 

Definition at line 375 of file plbitmap.h.

References PLASSERT_VALID.

Referenced by PLFilterVideoInvert::Apply(), PLFilterThreshold::Apply(), PLFilterResizeHamming::Apply(), PLFilterResizeGaussian::Apply(), PLFilterResizeBox::Apply(), PLFilterResizeBilinear::Apply(), PLFilterQuantize::Apply(), PLFilterMirror::Apply(), PLFilterLightness::Apply(), PLFilterIntensity::Apply(), PLFilterGrayscale::Apply(), PLFilterGetAlpha::Apply(), PLFilterFlip::Apply(), PLFilterContrast::Apply(), PLFilterPixel< PixelC, PixelOp >::ApplyInPlace(), PLFilterFill::ApplyInPlace(), create1BPPCopy(), create8BPPCopy(), CreateCopy(), createTrueColorCopy(), PLFilterQuantize::ditherDestBmp(), PLPNGEncoder::DoEncode(), PLTIFFEncoder::DoTiffEncode(), PLFilterQuantize::genColorArray(), internalCopy(), and SetAlphaChannel().

PLBYTE ** PLBmp::GetLineArray  )  const [inline]
 

Returns pointer to an array containing the starting addresses of the bitmap lines.

This array should be used whenever the bitmap bits need to be manipulated directly.

Definition at line 437 of file plbitmap.h.

References PLASSERT.

Referenced by PLFilterVideoInvert::Apply(), PLFilterThreshold::Apply(), PLFilterResizeHamming::Apply(), PLFilterResizeGaussian::Apply(), PLFilterResizeBox::Apply(), PLFilterResizeBilinear::Apply(), PLFilterLightness::Apply(), PLFilterIntensity::Apply(), PLFilterGrayscale::Apply(), PLFilterGetAlpha::Apply(), PLFilterCrop::Apply(), PLFilterContrast::Apply(), PLFilterPixel< PixelC, PixelOp >::ApplyInPlace(), PLFilterFillRect< PixelC >::ApplyInPlace(), create1BPPCopy(), create8BPPCopy(), createTrueColorCopy(), PLFilterQuantize::ditherDestBmp(), PLGIFDecoder::DoDecode(), PLPNGEncoder::DoEncode(), PLTIFFDecoder::doLoColor(), PLTIFFEncoder::DoTiffEncode(), GetPixel(), internalCopy(), and SetAlphaChannel().

PLPixel24 ** PLBmp::GetLineArray24  )  const [inline]
 

Returns pointer to an array containing the starting addresses of the bitmap lines.

This array should be used whenever the bitmap bits need to be manipulated directly.

Definition at line 452 of file plbitmap.h.

References PLASSERT.

PLPixel32 ** PLBmp::GetLineArray32  )  const [inline]
 

Returns pointer to an array containing the starting addresses of the bitmap lines.

This array should be used whenever the bitmap bits need to be manipulated directly.

Definition at line 444 of file plbitmap.h.

References PLASSERT.

Referenced by PLFilterGetAlpha::Apply(), PLPCXDecoder::DoDecode(), PLTIFFDecoder::doHiColor(), PLFilterQuantize::genColorArray(), SetAlphaChannel(), and SetPixel().

virtual long PLBmp::GetMemUsed  )  [pure virtual]
 

Implemented in PLAnyBmp.

Referenced by PLPicEncoder::MakeFileFromBmp().

int PLBmp::GetNumColors  )  [inline]
 

Definition at line 396 of file plbitmap.h.

References PLASSERT_VALID.

Referenced by PLTIFFEncoder::DoTiffEncode(), FindNearestColor(), SetGrayPalette(), and SetPalette().

PLPixel32 * PLBmp::GetPalette  )  const [inline]
 

Returns the address of the color table of the bitmap or NULL if no color table exists.

The color table is stored as an array of consecutive PLPixel32 objects.

Definition at line 460 of file plbitmap.h.

References PLASSERT_VALID.

Referenced by PLFilterMirror::Apply(), PLFilterFlip::Apply(), PLFilterCrop::Apply(), create1BPPCopy(), create8BPPCopy(), createPNGPalette(), createTrueColorCopy(), PLFilterQuantize::ditherDestBmp(), PLPNGEncoder::DoEncode(), PLTIFFEncoder::DoTiffEncode(), FindNearestColor(), PLFilterQuantize::genDefaultPalette(), PLFilterQuantize::genMedianPalette(), PLFilterQuantize::genPopularityPalette(), and internalCopy().

PLPixel32 PLBmp::GetPixel int  x,
int  y
const [inline]
 

Slow but simple function to get a single pixel. 32 bpp only.

Definition at line 350 of file plbitmap.h.

References GetBitsPerPixel(), GetLineArray(), and PLASSERT.

Referenced by PLFilterMirror::Apply(), and PLFilterFlip::Apply().

Here is the call graph for this function:

const PLPoint & PLBmp::GetResolution  )  const [inline]
 

Gets the bitmap resolution in pixels per inch.

Returns 0 if the resolution is unknown.

Definition at line 383 of file plbitmap.h.

References PLASSERT_VALID.

Referenced by PLFilterVideoInvert::Apply(), PLFilterThreshold::Apply(), PLFilterResizeHamming::Apply(), PLFilterResizeGaussian::Apply(), PLFilterResizeBox::Apply(), PLFilterResizeBilinear::Apply(), PLFilterQuantize::Apply(), PLFilterMirror::Apply(), PLFilterLightness::Apply(), PLFilterIntensity::Apply(), PLFilterGrayscale::Apply(), PLFilterGetAlpha::Apply(), PLFilterFlip::Apply(), PLFilterCrop::Apply(), PLFilterContrast::Apply(), CreateCopy(), PLPNGEncoder::DoEncode(), and internalCopy().

int PLBmp::GetWidth  )  const [inline]
 

Definition at line 365 of file plbitmap.h.

References PLASSERT_VALID.

Referenced by PLFilterVideoInvert::Apply(), PLFilterThreshold::Apply(), PLFilterResizeHamming::Apply(), PLFilterResizeGaussian::Apply(), PLFilterResizeBox::Apply(), PLFilterResizeBilinear::Apply(), PLFilterQuantize::Apply(), PLFilterMirror::Apply(), PLFilterLightness::Apply(), PLFilterIntensity::Apply(), PLFilterGrayscale::Apply(), PLFilterGetAlpha::Apply(), PLFilterFlip::Apply(), PLFilterContrast::Apply(), PLFilterPixel< PixelC, PixelOp >::ApplyInPlace(), PLFilterFill::ApplyInPlace(), create1BPPCopy(), create8BPPCopy(), CreateCopy(), createTrueColorCopy(), PLFilterQuantize::ditherDestBmp(), PLPNGEncoder::DoEncode(), PLTIFFEncoder::DoTiffEncode(), PLFilterQuantize::genColorArray(), internalCopy(), and SetAlphaChannel().

bool PLBmp::HasAlpha  )  const [inline]
 

Definition at line 417 of file plbitmap.h.

References PLASSERT_VALID.

Referenced by PLFilterResizeHamming::Apply(), PLFilterResizeGaussian::Apply(), PLFilterResizeBox::Apply(), PLFilterResizeBilinear::Apply(), PLFilterMirror::Apply(), PLFilterLightness::Apply(), PLFilterIntensity::Apply(), PLFilterGetAlpha::Apply(), PLFilterFlip::Apply(), PLFilterCrop::Apply(), PLFilterContrast::Apply(), CreateCopy(), PLPNGEncoder::DoEncode(), EncodeTransformation(), and internalCopy().

virtual void PLBmp::initLineArray  )  [protected, pure virtual]
 

Initialize internal table of line addresses.

Implemented in PLAnyBmp.

Referenced by initLocals().

void PLBmp::initLocals PLLONG  Width,
PLLONG  Height,
PLWORD  BitsPerPixel,
bool  bAlphaChannel
[protected]
 

Can be called from internalCreate() to initialize object state.

Definition at line 430 of file plbitmap.cpp.

References initLineArray(), m_bAlphaChannel, m_bpp, m_Height, m_Width, PLASSERT_VALID, PLLONG, PLWORD, and SetGrayPalette().

Here is the call graph for this function:

void PLBmp::internalCopy const PLBmp rSrPLBmp  )  [protected]
 

Creates a new PLBmp as copy of rSrPLBmp.

Assumes there is no memory allocated yet.

Definition at line 448 of file plbitmap.cpp.

References GetBitsPerPixel(), GetBytesPerLine(), GetHeight(), GetLineArray(), GetPalette(), GetResolution(), GetWidth(), HasAlpha(), internalCreate(), Lock(), PLASSERT_VALID, PLBYTE, SetPalette(), SetResolution(), and Unlock().

Referenced by CreateCopy().

Here is the call graph for this function:

virtual void PLBmp::internalCreate PLLONG  Width,
PLLONG  Height,
PLWORD  BitsPerPixel,
bool  bAlphaChannel
[protected, pure virtual]
 

Create a new bitmap with uninitialized bits.

(Assume no memory is allocated yet.)

Implemented in PLAnyBmp.

Referenced by Create(), and internalCopy().

bool PLBmp::IsLocked  )  const [inline]
 

Definition at line 470 of file plbitmap.h.

void PLBmp::Lock bool  bReadable,
bool  bWriteable
[virtual]
 

Locks bitmap.

GetLineArray() and other direct-access methods should only be called if the bitmap is locked. Lock and Unlock keep a lock count. In most cases (currently: all but PLDDrawBmp), the lock count will always be >= 1, so access is always possible.

Definition at line 326 of file plbitmap.cpp.

References m_LockCount, and PLASSERT.

Referenced by create1BPPCopy(), create8BPPCopy(), createTrueColorCopy(), PLPCXDecoder::DoDecode(), PLTIFFDecoder::doHiColor(), PLTIFFDecoder::doLoColor(), internalCopy(), and SetAlphaChannel().

PLBmp & PLBmp::operator= PLBmp const &  Orig  )  [inline]
 

Assignment operator.

Note that assignment between different derived classes is possible and results in a format conversion.

Reimplemented in PLAnyBmp.

Definition at line 322 of file plbitmap.h.

Referenced by PLAnyBmp::operator=().

bool const PLBmp::operator== PLBmp const &  Other  ) 
 

Test for equality.

This function actually tests every pixel, so it's not fast. It's meant mainly for use in asserts and such.

Definition at line 47 of file plbitmap.cpp.

void PLBmp::SetAlphaChannel PLBmp pAlphaBmp  ) 
 

Replaces the alpha channel of the bitmap with a new one.

This only works for bitmaps with 32 bpp. pAlphaBmp must point to an 8 bpp bitmap with the same dimensions as the object. The alpha channel information is physically copied into the bitmap.

Definition at line 277 of file plbitmap.cpp.

References GetBitsPerPixel(), GetHeight(), GetLineArray(), GetLineArray32(), GetWidth(), Lock(), m_bAlphaChannel, PLASSERT, PLASSERT_VALID, PLBYTE, PLPixel32::SetA(), and Unlock().

Here is the call graph for this function:

void PLBmp::SetGrayPalette  ) 
 

Fills the color table with a grayscale palette.

This function is only useable for bitmaps containing a color table. Index 0 contains black (0) and the last index contains white (255). The alpha channel is set to opaque (255) for every palette entry.

Definition at line 255 of file plbitmap.cpp.

References GetNumColors(), m_pClrTab, PLASSERT, and SetPaletteEntry().

Referenced by initLocals().

Here is the call graph for this function:

void PLBmp::SetHasAlpha bool  b  )  [inline]
 

Definition at line 426 of file plbitmap.h.

References PLASSERT_VALID.

void PLBmp::SetPalette PLPixel32 pPal  ) 
 

Sets the color table to pPal. The contents or pPal are copied.

Definition at line 268 of file plbitmap.cpp.

References GetNumColors(), m_pClrTab, and PLASSERT.

Referenced by PLFilterQuantize::Apply(), PLFilterMirror::Apply(), PLFilterFlip::Apply(), PLFilterCrop::Apply(), PLTIFFDecoder::doLoColor(), and internalCopy().

Here is the call graph for this function:

void PLBmp::SetPaletteEntry PLBYTE  Entry,
PLPixel32  Value
[inline]
 

Sets one entry in the color table.

The function may only be called if there is a color table stored with the bitmap. The color table entry is set to the red, green, blue, and alpha values specified.

Definition at line 342 of file plbitmap.h.

References PLBYTE.

void PLBmp::SetPaletteEntry PLBYTE  Entry,
PLBYTE  r,
PLBYTE  g,
PLBYTE  b,
PLBYTE  a
[inline]
 

Sets one entry in the color table.

The function may only be called if there is a color table stored with the bitmap. The color table entry is set to the red, green, blue, and alpha values specified.

Definition at line 331 of file plbitmap.h.

References PLBYTE.

Referenced by create1BPPCopy(), create8BPPCopy(), PLGIFDecoder::DoDecode(), and SetGrayPalette().

void PLBmp::SetPixel int  x,
int  y,
PLPixel32  pixel
[inline]
 

Slow but simple function to set a single pixel. 32 bpp only.

Definition at line 356 of file plbitmap.h.

References GetBitsPerPixel(), GetLineArray32(), and PLASSERT.

Referenced by PLFilterMirror::Apply(), and PLFilterFlip::Apply().

Here is the call graph for this function:

void PLBmp::SetQuantizationMode int  DitherType,
int  DitherPaletteType
 

Sets quality of conversion to 8 bpp.

Valid parameters are defined in FilterQuantize.h.

Definition at line 210 of file plbitmap.cpp.

References m_DitherPaletteType, m_DitherType, and PLASSERT_VALID.

void PLBmp::SetResolution const PLPoint Resolution  )  [inline]
 

Sets the bitmap resolution in pixels per inch.

Definition at line 389 of file plbitmap.h.

References m_Resolution, and PLASSERT_VALID.

Referenced by CreateCopy(), PLTIFFDecoder::DoDecode(), PLPCXDecoder::DoDecode(), and internalCopy().

void PLBmp::Unlock  )  [virtual]
 

Unlocks the Bitmap surface.

Definition at line 334 of file plbitmap.cpp.

References PLASSERT.

Referenced by create1BPPCopy(), create8BPPCopy(), createTrueColorCopy(), PLPCXDecoder::DoDecode(), PLTIFFDecoder::doHiColor(), PLTIFFDecoder::doLoColor(), internalCopy(), and SetAlphaChannel().


Member Data Documentation

bool PLBmp::m_bAlphaChannel [protected]
 

Definition at line 310 of file plbitmap.h.

Referenced by initLocals(), and SetAlphaChannel().

PLWORD PLBmp::m_bpp [protected]
 

Definition at line 306 of file plbitmap.h.

Referenced by initLocals().

int PLBmp::m_DitherPaletteType [protected]
 

Definition at line 317 of file plbitmap.h.

Referenced by create8BPPCopy(), and SetQuantizationMode().

int PLBmp::m_DitherType [protected]
 

Definition at line 316 of file plbitmap.h.

Referenced by create8BPPCopy(), and SetQuantizationMode().

int PLBmp::m_Height [protected]
 

Definition at line 305 of file plbitmap.h.

Referenced by initLocals().

int PLBmp::m_LockCount [protected]
 

Definition at line 313 of file plbitmap.h.

Referenced by Lock().

PLPixel32* PLBmp::m_pClrTab [protected]
 

Definition at line 309 of file plbitmap.h.

Referenced by SetGrayPalette(), and SetPalette().

PLBYTE** PLBmp::m_pLineArray [protected]
 

Definition at line 311 of file plbitmap.h.

PLPoint PLBmp::m_Resolution [protected]
 

Definition at line 307 of file plbitmap.h.

Referenced by Create(), and SetResolution().

int PLBmp::m_Width [protected]
 

Definition at line 304 of file plbitmap.h.

Referenced by initLocals().


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 21:20:59 2004 for vuVolume by  doxygen 1.3.9.1