示例#1
0
文件: channel.go 项目: 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...))
}
示例#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
文件: vibrance.go 项目: 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))
}
示例#6
0
文件: vibrance.go 项目: 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))
}