HalfTonePattern method (ILEADRasterProcess)
short HalfTonePattern(ILEADRaster * pRaster, long lContrast, long lRipple, long lAngleContrast, long lAngleRipple, long lAngleOffset, OLE_COLOR crForeGround, OLE_COLOR crBackGround, HalfTonePatterenConstants Flags); | |
Overview |
Refer to Examining and Altering Bitmaps. |
Remarks
(Raster Pro and above only) Creates a halftone screen effect for an image while keeping its continuous range of tones.
Use this method to create a halftone screen effect for an image while keeping its continuous range of tones. Use the lContrast parameter to control the amount of the midtones in the image.
Use the ColorHalfTone to create an enlarged halftone screen for each image channel. The filter divides the image into rectangles and replaces each rectangle with circles, one for each channel. The size of each circle is proportional to the brightness of the rectangle, which it is replacing.
Use the HalfTone method to convert a 1-, 4-, 8-, 16-, 24-, or 32-bit bitmap to a halftoned bitmap, with a specified pattern rotation. A halftoned bitmap is a 1-bit bitmap that has been dithered for black and white printing or display.
Use the GrayScaleExt method to convert any bitmap to a gray scale bitmap without changing its resolution.
As an example, if you use the following image:
And you were to call the HalfTonePattern method using the following settings:
Parameter |
Value |
lContrast |
1 |
lRipple |
20000 |
lAngleContrast |
na |
lAngleRipple |
na |
lAngleOffset |
na |
crForeGround |
Black |
crBackGround |
White |
Flags |
HTPATTERN_DOT |
The following figure results:
As another example, if you were to use the same original bitmap but call HalfTonePattern using the following settings:
Parameter |
Value |
lContrast |
75 |
lRipple |
20000 |
lAngleContrast |
85 |
lAngleRipple |
4 |
lAngleOffset |
54 |
crForeGround |
White |
crBackGround |
Brown |
Flags |
HTPATTERN_CIRCLE |
The following figure results:
This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.
If the bitmap has a region, this method works only on the region. If the bitmap does not have a region, this method works on the entire bitmap.
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