Conv8to32 Class Reference

An 8 to 32 bpp converter. More...

Inheritance diagram for Conv8to32:

DIBConvert List of all members.

Public Member Functions

 Conv8to32 (LPBITMAPINFO pSourceHeader)
 Constructor to convert 8 to 32.
BOOL Convert (LPBYTE pInput, LPBYTE pOutput, UINT32 Height, BOOL FirstStrip)
 Sub-optimal conversion routine.

Protected Attributes

LPBITMAPINFO m_pSourceHeader

Detailed Description

An 8 to 32 bpp converter.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/11/96

Definition at line 229 of file dibconv.cpp.


Constructor & Destructor Documentation

Conv8to32::Conv8to32 LPBITMAPINFO  pSourceHeader  ) 
 

Constructor to convert 8 to 32.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/11/96

Definition at line 904 of file dibconv.cpp.

00905 {
00906     ERROR3IF(pSourceHeader->bmiHeader.biBitCount != 8,"Conv8to32 not 8bpp");
00907 
00908     m_pSourceHeader = pSourceHeader;
00909 }


Member Function Documentation

BOOL Conv8to32::Convert LPBYTE  pInputBits,
LPBYTE  pOutputBits,
UINT32  Height,
BOOL  FirstStrip
[virtual]
 

Sub-optimal conversion routine.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/11/96

Implements DIBConvert.

Definition at line 922 of file dibconv.cpp.

00923 {
00924     ERROR3IF(pInputBits == NULL || pOutputBits == NULL, "Conv8to32: NULL Inputs");
00925 
00926     const RGBQUAD* pPalette = m_pSourceHeader->bmiColors;
00927     const UINT32 Width = m_pSourceHeader->bmiHeader.biWidth;
00928 
00929     RGBQUAD* pCurrentOutput = (RGBQUAD*)pOutputBits;
00930     LPBYTE pCurrentInput    = pInputBits;
00931 
00932     while (Height--)
00933     {
00934         UINT32 CurrentX = Width;
00935         while (CurrentX--)
00936         {
00937             RGBQUAD PaletteEntry = pPalette[*pCurrentInput];
00938             PaletteEntry.rgbReserved = 0xFF;
00939 
00940             *pCurrentOutput = PaletteEntry;
00941 
00942             ++pCurrentOutput;
00943             ++pCurrentInput;
00944         }
00945     }
00946 
00947     return TRUE;
00948 }


Member Data Documentation

LPBITMAPINFO Conv8to32::m_pSourceHeader [protected]
 

Definition at line 237 of file dibconv.cpp.


The documentation for this class was generated from the following file:
Generated on Sat Nov 10 03:53:10 2007 for Camelot by  doxygen 1.4.4