Beispiel #1
0
// Adjust applies the given Adjuster to the Image on only the Channels specified.
func Adjust(img image.Image, adj utils.Adjuster, chs ...Channel) image.Image {
	return utils.MapColor(img, AdjustC(adj, chs...))
}
Beispiel #2
0
// Sigmoidal adjusts the contrast in a non-linear way. Factor sets how much to
// increase the contrast, midpoint sets where midtones fall in the resultant
// image.
func Sigmoidal(img image.Image, factor, midpoint float64) image.Image {
	return utils.MapColor(img, SigmoidalC(factor, midpoint))
}
Beispiel #3
0
// Linear adjusts the contrast using a linear function. A value of 1 has no
// effect, and a value of 0 will return a grey image.
func Linear(img image.Image, value float64) image.Image {
	return utils.MapColor(img, LinearC(value))
}
Beispiel #4
0
// Adjust changes the contrast in the Image. A value of 0 has no effect.
func Adjust(img image.Image, value float64) image.Image {
	return utils.MapColor(img, AdjustC(value))
}
Beispiel #5
0
// Exp increases the saturation of the least saturated parts of an image.
func Exp(img image.Image, amount float64) image.Image {
	return utils.MapColor(img, ExpC(amount))
}
Beispiel #6
0
// Adjust increases the saturation of the least saturated parts of the image
// while also reducing the lightness of these parts.
func Adjust(img image.Image, amount float64) image.Image {
	return utils.MapColor(img, AdjustC(amount))
}