mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-16 02:45:54 -07:00
fix(options): use float64 type in Options.Threshold
This commit is contained in:
parent
03f7d1fe04
commit
90e5ea5d3a
2 changed files with 3 additions and 3 deletions
|
|
@ -198,7 +198,7 @@ type Options struct {
|
||||||
Compression int
|
Compression int
|
||||||
Zoom int
|
Zoom int
|
||||||
Crop bool
|
Crop bool
|
||||||
SmartCrop bool // Deprecated
|
SmartCrop bool // Deprecated, use: bimg.Options.Gravity = bimg.GravitySmart
|
||||||
Enlarge bool
|
Enlarge bool
|
||||||
Embed bool
|
Embed bool
|
||||||
Flip bool
|
Flip bool
|
||||||
|
|
@ -220,6 +220,6 @@ type Options struct {
|
||||||
Interpretation Interpretation
|
Interpretation Interpretation
|
||||||
GaussianBlur GaussianBlur
|
GaussianBlur GaussianBlur
|
||||||
Sharpen Sharpen
|
Sharpen Sharpen
|
||||||
Threshold float32
|
Threshold float64
|
||||||
OutputICC string
|
OutputICC string
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
vips.go
2
vips.go
|
|
@ -504,7 +504,7 @@ func vipsSmartCrop(image *C.VipsImage, width, height int) (*C.VipsImage, error)
|
||||||
return buf, nil
|
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))
|
defer C.g_object_unref(C.gpointer(image))
|
||||||
|
|
||||||
top := C.int(0)
|
top := C.int(0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue