Example #1
0
File: channel.go Project: hawx/img
// 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...))
}
Example #2
0
File: adjust.go Project: 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))
}
Example #3
0
File: adjust.go Project: 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))
}
Example #4
0
File: adjust.go Project: 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))
}
Example #5
0
File: vibrance.go Project: hawx/img
// 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))
}
Example #6
0
File: vibrance.go Project: hawx/img
// 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))
}