ColorRes method (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

int ColorRes (int iBitsPerPixel, int iPalette, int iDither, int iColors);

Delphi Syntax

ColorRes (iBitsPerPixel, iPalette, iDither, iColors: Integer): Integer;

Overview

Refer to Examining and Altering Bitmaps.

Remarks

Converts the bitmap from any bits-per-pixel to any bits-per-pixel, letting you specify the palette to use.

Also, when converting to 16-bits per pixel or higher, you can specify RGB or BGR color order.

Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements:

UserPalette property

Topics:

Raster Images: Doing Color Expansion or Reduction