Glossary Item Box

ImageMan DLL Suite Version 8 Submit feedback on this topic   

ImgContrast

int IMAPI ImgContrast ( hImage, iPercentage, iMedian, iChannel )

This function adjusts the color contrast of an image.

 

Parameter

Type

Description

hImage

HANDLE

Identifies the image to be adjusted.

iPercentage

int

Percentage of color differences to adjust the image by.

iMedian

int

Median value from which to base the color differences.

iChannel

int

Specific color channel to apply the contrast.

 

Valid values for the iChannel parameter are:

 

Value

Description

RGB_RED

adjust the red channel

RGB_GREEN

adjust the green channel

RGB_BLUE

adjust the blue channel

RGB_ALPHA

adjust the alpha channel

RGB_FULL

adjust all the channels

 

 

Return Value

The return value is IMG_OK if the function was successful. Otherwise, it returns IMG_ERR.

 

Comments

This function only operates on 24 bit color images.

 

Specify -1 as the median to use a histogram generated median value. It is better to let the function use a histogram median value since this value is representative of the actual image color content.

 

 


Copyright 2008 Data Techniques, Inc. All Rights Reserved