ImageGear for C and C++ on Linux v18.10 - Updated
MED_IP_reduce_depth_with_downshift
API Reference Guide > MD Component API Reference > MD Component Functions Reference > Image Processing Functions > MED_IP_reduce_depth_with_downshift

This function is used to downshift a chosen range of 8 bits (out of a maximum of 16) to the 256 pixel values that can be shown on an 8-bit display device.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI MED_IP_reduce_depth_with_downshift (
        HIGEAR hIGear,
        const UINT downshift
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle to the image.
downshift const UINT A UINT variable specifying the downshift value.

Return Value:

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

Supported Raster Image Formats:

Grayscale – 9…16 bpp.

Remarks:

This function is used to downshift a chosen range of 8 bits (out of a maximum of 16) to the 256 pixel values that can be shown on an 8-bit display device. For example, if you set downshift to 8, and the image has 16 bpp, bits 8-15 will be downshifted and used alone as the pixel values.

This function will directly alter the pixel data.

See also MED_IP_reduce_depth_with_LUT().