mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-08 23:18:19 -07:00
Fix the unref of images, when image isn't transparent
This commit is contained in:
parent
ff7970929b
commit
6524efa800
2 changed files with 6 additions and 4 deletions
3
vips.go
3
vips.go
|
|
@ -604,9 +604,6 @@ func vipsDrawWatermark(image *C.VipsImage, o WatermarkImage) (*C.VipsImage, erro
|
|||
return nil, e
|
||||
}
|
||||
|
||||
defer C.g_object_unref(C.gpointer(image))
|
||||
defer C.g_object_unref(C.gpointer(watermark))
|
||||
|
||||
opts := vipsWatermarkImageOptions{C.int(o.Left), C.int(o.Top), C.float(o.Opacity)}
|
||||
|
||||
err := C.vips_watermark_image(image, watermark, &out, (*C.WatermarkImageOptions)(unsafe.Pointer(&opts)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue