Method Image.Image()->gamma()


Method gamma

object gamma(float g)
object gamma(float gred, object floatggreen, object floatgblue)

Description

Calculate pixels in image by gamma curve.

Intensity of new pixels are calculated by:
i' = i^g

For example, you are viewing your image on a screen with gamma 2.2. To correct your image to the correct gamma value, do something like:

my_display_image(my_image()->gamma(1/2.2);

Parameter g
Parameter gred
Parameter ggreen
Parameter gblue

gamma value

Returns

a new image object

See also

grey, `*, color