GammaFilter

This commit is contained in:
sugimotoren 2019-08-01 15:30:44 +09:00
parent 15cd115607
commit f67988d37b
5 changed files with 40 additions and 0 deletions

View file

@ -185,6 +185,12 @@ func (i *Image) Trim() ([]byte, error) {
return i.Process(options)
}
// Gamma returns the gamma filtered image buffer.
func (i *Image) Gamma(exponent float64) ([]byte, error) {
options := Options{Gamma: exponent}
return i.Process(options)
}
// Process processes the image based on the given transformation options,
// talking with libvips bindings accordingly and returning the resultant
// image buffer.