Conv24to32 Class Reference

A 24 to 32 bpp converter. More...

Inheritance diagram for Conv24to32:

DIBConvert List of all members.

Public Member Functions

 Conv24to32 (LPBITMAPINFO pSourceHeader)
 Constructor to convert 24 to 32.
BOOL Convert (LPBYTE pInput, LPBYTE pOutput, UINT32 Height, BOOL FirstStrip)

Protected Attributes

LPBITMAPINFO m_pSourceHeader

Detailed Description

A 24 to 32 bpp converter.

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

Definition at line 251 of file dibconv.cpp.


Constructor & Destructor Documentation

Conv24to32::Conv24to32 LPBITMAPINFO  pSourceHeader  ) 
 

Constructor to convert 24 to 32.

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

Definition at line 960 of file dibconv.cpp.

00961 {
00962     ERROR3IF(pSourceHeader->bmiHeader.biBitCount != 24,"Conv24to32 not 24bpp");
00963 
00964     m_pSourceHeader = pSourceHeader;
00965 }


Member Function Documentation

BOOL Conv24to32::Convert LPBYTE  pInput,
LPBYTE  pOutput,
UINT32  Height,
BOOL  FirstStrip
[virtual]
 

Implements DIBConvert.

Definition at line 978 of file dibconv.cpp.

00979 {
00980     ERROR3IF(pInputBits == NULL || pOutputBits == NULL, "Conv24to32: NULL Inputs");
00981 
00982     // Convert a scanline from 24 to 32 bpp so that GDraw can work with it
00983     // source form is B,G,R
00984     // dest is B,G,R,spare
00985     // Note: if not little-endian, is this still true?
00986     const UINT32 Width = m_pSourceHeader->bmiHeader.biWidth;
00987 
00988     for (UINT32 CurrentY = Height; CurrentY != 0; --CurrentY)
00989     {
00990         for (UINT32 CurrentX = Width; CurrentX != 0; --CurrentX)
00991         {
00992             pOutputBits[0] = pInputBits[0];
00993             pOutputBits[1] = pInputBits[1];
00994             pOutputBits[2] = pInputBits[2];
00995             pOutputBits[3] = 0xFF;
00996             pOutputBits += 4;
00997             pInputBits  += 3;
00998         }
00999     }
01000 
01001     return TRUE;
01002 }


Member Data Documentation

LPBITMAPINFO Conv24to32::m_pSourceHeader [protected]
 

Definition at line 259 of file dibconv.cpp.


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