Color Halftone and Halftone Images

Halftoning is taking an image that uses continuous tones and creating one suitable for printing using one color of ink (grayscale) or four colors of ink (color printing using the Cyan, Magenta, Yellow and Black process colors). In the CMYK colored print process four separations (also called screens) are made, one for each process color. Different sizes of the dots of ink are used to produce the different levels of color. These dots are not large enough to be seen without magnification. After different adjustments are made to the separations, the article being printed goes through a process where each color gets printed in succession, one on top of the other. To prevent moire patterns, each screen is set to a different angle.

In digital printing, generally the dot size remains constant (instead of varying). Instead the dots are broken up into small halftone cells, and the different color values are created by varying the number of the small halftone cells that take color.

LEADTOOLS provides a number of functions for working with color images and changing them so they are suitable for printing using halftoning techniques.

Color Images

Use the L_ColorSeparateBitmap function to separate the specified bitmap by color plane to produce one grayscale image per plane. Note that in addition to the CYMK color space used by CYMK process printing, this function also supports the RGB, CMY, HSV, and HLS color-space models.

For an example, click here.

Use the L_ColorMergeBitmap function to create a color bitmap by merging grayscale bitmaps that were created as color separations. You can use this to recombine the bitmaps that the L_ColorSeparateBitmap function creates.

Use the L_ColorHalfToneBitmap function to divide the image into rectangles and replace each rectangle with circles. Each channel has a separate grid of circles, and has its own angle setting. The size of each circle is proportional to the brightness of the rectangle which it is replacing. Note that with this function, the circles are large enough to be individually seen.

For an example, click here.

Halftones

Use the L_DesaturateBitmap to convert an image to a grayscale level by reducing the saturation of each color to zero. The conversion will not change the color resolution.

Use the L_HalfToneBitmap function to convert a 1-, 4-, 8-, 16-, 24-, or 32-bit bitmap to a halftoned bitmap, with a specified pattern rotation.

For an example, click here.

Use the L_HalfTonePatternBitmap function to create a halftone screen effect for an image while keeping its continuous range of tones.

For an example, click here.

Getting Information About Images

Use the L_GetBitmapStatisticsInfo function to obtain statistical information about the bitmap. This includes such information as the mean, median, standard deviation, maximum, minimum, and pixel count values. Use the L_GetBitmapHistogram function to obtain an array that charts how many times each intensity level occurs in a bitmap. This function can chart red, green, and blue separately or together. It is used for all resolutions, including 12 and 16-bit grayscale. Use the L_GetBitmapColorCount function to get the number of unique colors in an image. Use the L_GetBitmapColors function to load your palette with selected colors from a bitmap handle's palette. Use the L_GetBitmapColorType function to obtain the type of the image and whether it's black and white, colored or grayscale, along with the confidence level. Use the L_GetMinMaxBits function to obtain the low and high bits of the values present in a 12 or 16-bit grayscale and 48 and 64-bit image. Use the L_GetMinMaxVal function to obtain the minimum and maximum intensity values present in a 12 or 16-bit grayscale and 48 and 64-bit image. Please note that support for 12 and 16-bit grayscale images is only available in Document and Medical Imaging toolkits.

Grayscale Images

LEADTOOLS provides a number of functions designed specifically for use with grayscale images, either creating a grayscale image, getting information about a grayscale image, or window leveling. For more information about these functions, refer to Grayscale Images.

Help Version 21.0.2023.2.15
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.