Пример #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...))
}
Пример #2
0
Файл: adjust.go Проект: hawx/img
// 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))
}
Пример #3
0
Файл: adjust.go Проект: hawx/img
// 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))
}
Пример #4
0
Файл: adjust.go Проект: hawx/img
// 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))
}
Пример #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))
}
Пример #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))
}