KwikPeg Manuals
Home
PegBmpConvert
Examples
Examples
Index
Index


Members
Styles
(none)
Signals
(none)
Overview Derived from class PegImageConvert

The PegBmpConvert class controls the conversion of images from the Microsoft BMP format to the PegBitmap format used by KwikPeg. The services provided by the PegImageConvert base class are used for color reduction, run length encoding (RLE) compression and transparency, if required.

To use the PegBmpConvert class or its derivatives, your KwikPeg configuration must have the following option enabled:
  Images: Bitmap (BMP) images



 See Also

PegGifConvert

PegJpgConvert

PegPngConvert

PegQuant


Top of page


 Members

Constructors:

PegBmpConvert(WORD wId = 0)

This constructor creates an image conversion object to be used to convert an image from BMP image format to the KwikPeg PegBitmap format.

 

Public Functions:

BmpHeader *GetBmpHeader(void)

This function returns a pointer to a structure which contains the information derived from the BMP image header.

The BmpHeader structure is defined as:

typedef struct 
{
    WORD          id;
    DWORD         file_size;
    WORD          reserved[2];
    DWORD         image_offset;
    WORD          header_size;
    WORD          not_used;
    DWORD         xres;
    DWORD         yres;
    WORD          numplanes;
    WORD          bits_per_pix;
    DWORD         compression;
    DWORD         bit_map_size;
    DWORD         hor_res;
    DWORD         vert_res;
    DWORD         number_of_colors;
    DWORD         num_sig_colors;
} BmpHeader;
virtual PegPixel GetULCColor(void)

This function is used privately by the PegImageConvert class to fetch the color of the upper left pixel of the bitmap image. The color is used by the image conversion process to add transparency to bitmap images.

virtual BOOL ReadImage(
  SIGNED iCount = 1)
virtual BOOL ReadImage(
  PegFile *pFile,
  SIGNED iCount = 1)

This function initiates the conversion process. Review the description provided for the PegImageConvert base class. Parameter iCount is not used when converting images of this class.

If the data streaming method is used for image access, only the first form of this function will be available.

If the file access method is used for image access, only the second form of this function will be available.


Top of page


 Examples

An example which uses the image conversion classes to read and display a collection of BMP, GIF and JPEG images is provided in the KwikPeg installation directory KPGnnn\EXAMPLES\IMGBROWS.




Top of page
KwikPeg Manuals
Home
Index
Index

 
Copyright © 2000-2003