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

This function takes an 8-bit grayscale or color image and converts it to a grayscale image with a bit depth of 16 bpp.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI MED_IP_promote_to_16_gray(
        HIGEAR hIGear, 
        const UINT iBits, 
        const UINT iHighBit
);

Arguments:

Name Type Description
hIGear HIGEAR The HIGEAR handle of the image to be converted.
iBits const UINT An integer variable that sets the number of bits that are actually used. The value range is 9 - 16 bits.
iHighBit const UINT An integer variable that sets the high bit for the new 16-bit image. The eighth bit of the original 8 bits is positioned here. If the image is saved as a DICOM, this information is saved to the High Bit Data Element (0028,0102).

Return Value:

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

Supported Raster Image Formats:

Grayscale – 8 bpp.

Remarks:

The original 8-bit image is discarded. All images created by this function have 16-bit pixels, iBits sets the number of bits out of the 16 that are actually used. iHighBit sets the new position among the 16 bits at which the original 8 bits should be positioned.

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