back to Table of Contents


ModifyGamma (function)

Due to the unlinear nature of display devices, a gamma correction must be used. Most of the time this is done automatically by the display device, but occasionally you'll meet images that could benefit from additional gamma correction. Gamma is usually defined as:

              g
        F := A

where F = new value, A = old value and g = gamma correction. Obviously, gamma is a real (floating point) number and a value of 1.0 means no correction at all.

Basically, if you wish your image to be brighter, give a correction over 1.0, if you wish to darken it, give a correction below 1.0. The difference to the ordinary brightness adjustment is, that gamma is a graylevel adjustment, hence it will leave alone clear black and white, but affects all colors between. The alpha channel of the source image is retained and copied 1:1.


SYNTAX:

newImg& = ModifyGamma& (shan&, gamma#, minX%, minY%, maxX%, maxY%, mask&)

INPUTS:

gamma# (DOUBLE)

shan&, mask& (LONGs)

minX%, minY%, maxX%, maxY% (INTEGERs)


RESULT:

newImg& (LONG)


back to Table of Contents