ImageGear for C and C++ on Windows v20.5 - Updated
MED_IP_reduce_depth_with_LUT
API Reference Guide > MD Component API Reference > MD Component Functions Reference > Image Processing Functions > MED_IP_reduce_depth_with_LUT

This function takes a 16-bit grayscale image and reduces it to a 8-bit grayscale one using provided (filled) LUT or current 16x8 display LUT.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI MED_IP_reduce_depth_with_LUT(
        HIGEAR hIGear, 
        const LPBYTE lpLUT, 
        const DWORD dwEntries
);

Arguments:

Name Type Description
hIGear HIGEAR The HIGEAR handle to the image to convert.
lpLUT const LPBYTE A far pointer to the look-up table to use for reduction. Set to NULL if you want to use the display LUT.
dwEntries const DWORD A variable of type DWORD that specifies the number of entries in the LUT. This value is ignored if the display LUT is used.

Return Value:

Returns the number of ImageGear errors that occurred during the function call.

Supported Raster Image Formats:

Grayscale – 9…16 bpp.

Remarks:

The 16-bit image is discarded and replaced with the new 8-bit grayscale image.

To reduce memory requirements the LUT does not have to have a 16-bit input. dwEntries should hold the number of entries in the LUT. If there is a pixel found that can overflow the LUT it is ignored and replaced with a 0.

This function does not reduce 8-bit images. To reduce an 8-bit image, use the appropriate IG_IP_color_reduce_...() function from the baseline ImageGear API.

Once this function is called, the display LUT will be thrown away, since it is now an 8-bit image.

See also MED_IP_reduce_depth_with_downshift().

Is this page helpful?
Yes No
Thanks for your feedback.