Documentation ¶
Overview ¶
Package adjust provides basic color correction functions.
Index ¶
- func Apply(img image.Image, fn func(color.RGBA) color.RGBA) *image.RGBA
- func Brightness(src image.Image, change float64) *image.RGBA
- func Contrast(src image.Image, change float64) *image.RGBA
- func Gamma(src image.Image, gamma float64) *image.RGBA
- func Hue(img image.Image, change int) *image.RGBA
- func Saturation(img image.Image, change float64) *image.RGBA
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
Apply returns a copy of the provided image after applying the provided color function to each pixel.
func Brightness ¶
Brightness returns a copy of the image with the adjusted brightness. Change is the normalized amount of change to be applied (range -1.0 to 1.0).
func Contrast ¶
Contrast returns a copy of the image with its difference in high and low values adjusted by the change param. Change is the normalized amount of change to be applied, in the range of -1.0 to 1.0. If Change is set to 0.0, then the values remain the same, if it's set to 0.5, then all values will be moved 50% away from the middle value.
func Gamma ¶
Gamma returns a gamma corrected copy of the image. Provided gamma param must be larger than 0.
Types ¶
This section is empty.