vips: add a vips__gaussblur method

handle both < 7.41 and higher.
Prior 7.41, vips_gaussblur took only a int param, the radius.
The radius was then divided by 2.0 (min_ampl) in vips_gaussblur.
After, you can now parameter the min_ampl and radius became sigma (and
passed from an integer to a double).
This commit is contained in:
Thomas Meson 2015-09-14 17:12:46 +02:00
parent 0f31f20ded
commit 404cbf902f
3 changed files with 29 additions and 0 deletions

11
vips.go
View file

@ -432,3 +432,14 @@ func boolToInt(b bool) int {
}
return 0
}
func vipsGaussianBlur(image *C.VipsImage, o GaussianBlur) (*C.VipsImage, error) {
var out *C.VipsImage
defer C.g_object_unref(C.gpointer(image))
err := C.vips__gaussblur(image, &out, C.double(o.Sigma), C.double(o.MinAmpl))
if err != 0 {
return nil, catchVipsError()
}
return out, nil
}