ImageMan DLL Suite Version 8Submit feedback on this topic   

ImgBrightness

int IMAPI ImgBrightness ( hImage, nBrightness )

This function brightens or darkens the referenced image.

 

Parameter

Type

Description

hImage

HANDLE

Identifies the image to be adjusted

nBrightness

INT

Specifies the brightness factor to be applied to the image

 

Return Value

The return value indicates whether the operation completed successfully. It is nonzero if the brightness was adjusted successfully. Otherwise, it is zero.

 

Comments

The value of nBrightness can range from -255 to 255. Positive numbers will darken the image while negative values will lighten it.

 

When working with palletized images (i.e., 256 colors or less) you must call the ImgGetPalette function after calling ImgBrightness to get a handle to the new palette to be used when displaying the adjusted image.

 

Note that this function alters the image, so if you need to keep the original image you should call ImgCopy before calling ImgBrightness.

 

 


© 1995-2004 Data Techniques, Inc. All rights reserved.