mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-14 18:05:55 -07:00
fix(reduce): resolve conflicts with master
This commit is contained in:
commit
bd028cd5da
3 changed files with 22 additions and 1 deletions
12
vips.go
12
vips.go
|
|
@ -528,6 +528,18 @@ func vipsShrink(input *C.VipsImage, shrink int) (*C.VipsImage, error) {
|
|||
return image, nil
|
||||
}
|
||||
|
||||
func vipsReduce(input *C.VipsImage, xshrink float64, yshrink float64) (*C.VipsImage, error) {
|
||||
var image *C.VipsImage
|
||||
defer C.g_object_unref(C.gpointer(input))
|
||||
|
||||
err := C.vips_reduce_bridge(input, &image, C.double(xshrink), C.double(yshrink))
|
||||
if err != 0 {
|
||||
return nil, catchVipsError()
|
||||
}
|
||||
|
||||
return image, nil
|
||||
}
|
||||
|
||||
func vipsEmbed(input *C.VipsImage, left, top, width, height int, extend Extend, background Color) (*C.VipsImage, error) {
|
||||
var image *C.VipsImage
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue