Halftone method (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

int Halftone (unsigned uType, int nAngle, unsigned uDim, HBITMAPLIST hList);

Delphi Syntax

Function Halftone (uType: Cardinal; nAngle: L_INT32; uDim: Cardinal; hList: HBITMAPLIST): L_INT;

Overview

Refer to Examining and Altering Bitmaps.

Remarks

Converts a 1-, 4-, 8-, 16-, 24-, or 32-bit bitmap to a half-toned bitmap, with a specified pattern rotation. A half-toned bitmap is a 1-bit bitmap that has been dithered for black and white printing or display.

For the HT_USERDEF option, the number of bitmaps in the list must be at least equal to (uDim * uDim + 1). Bitmaps with higher indexes correspond to higher intensity values.

This method can process the whole image or a region of the image.

This method does not support 12 and 16-bit grayscale and 48 and 64-bit color images.

If the bitmap is originally 1-bit but is not black and white, this method changes it to black and white.

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

Topics:

Raster Images: Doing Color Expansion or Reduction