From 90e5ea5d3abee78a9b2e0591f57cc1d79731886c Mon Sep 17 00:00:00 2001 From: Tomas Aparicio Date: Thu, 23 Nov 2017 16:20:12 +0100 Subject: [PATCH] fix(options): use float64 type in Options.Threshold --- options.go | 4 ++-- vips.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/options.go b/options.go index 0756dd6..11ca0ca 100644 --- a/options.go +++ b/options.go @@ -198,7 +198,7 @@ type Options struct { Compression int Zoom int Crop bool - SmartCrop bool // Deprecated + SmartCrop bool // Deprecated, use: bimg.Options.Gravity = bimg.GravitySmart Enlarge bool Embed bool Flip bool @@ -220,6 +220,6 @@ type Options struct { Interpretation Interpretation GaussianBlur GaussianBlur Sharpen Sharpen - Threshold float32 + Threshold float64 OutputICC string } diff --git a/vips.go b/vips.go index 5b887cd..ad54012 100644 --- a/vips.go +++ b/vips.go @@ -504,7 +504,7 @@ func vipsSmartCrop(image *C.VipsImage, width, height int) (*C.VipsImage, error) return buf, nil } -func vipsTrim(image *C.VipsImage, background Color, threshold float32) (int, int, int, int, error) { +func vipsTrim(image *C.VipsImage, background Color, threshold float64) (int, int, int, int, error) { defer C.g_object_unref(C.gpointer(image)) top := C.int(0)