mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-13 17:30:28 -07:00
GammaFilter
This commit is contained in:
parent
15cd115607
commit
f67988d37b
5 changed files with 40 additions and 0 deletions
11
vips.go
11
vips.go
|
|
@ -703,3 +703,14 @@ func vipsDrawWatermark(image *C.VipsImage, o WatermarkImage) (*C.VipsImage, erro
|
|||
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func vipsGamma(image *C.VipsImage, Gamma float64) (*C.VipsImage, error) {
|
||||
var out *C.VipsImage
|
||||
defer C.g_object_unref(C.gpointer(image))
|
||||
|
||||
err := C.vips_gamma_bridge(image, &out, C.double(Gamma))
|
||||
if err != 0 {
|
||||
return nil, catchVipsError()
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue