mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-17 03:06:41 -07:00
fix(#31)
This commit is contained in:
parent
eb933a8c38
commit
c2a502a611
3 changed files with 17 additions and 16 deletions
3
vips.go
3
vips.go
|
|
@ -229,6 +229,7 @@ func vipsSave(image *C.struct__VipsImage, o vipsSaveOptions) ([]byte, error) {
|
|||
err = C.vips_webpsave_bridge(image, &ptr, &length, 1, C.int(o.Quality), 0)
|
||||
break
|
||||
default:
|
||||
debug("Save JPEG options: Q: %s", o.Quality)
|
||||
err = C.vips_jpegsave_bridge(image, &ptr, &length, 1, C.int(o.Quality), 0)
|
||||
break
|
||||
}
|
||||
|
|
@ -239,7 +240,7 @@ func vipsSave(image *C.struct__VipsImage, o vipsSaveOptions) ([]byte, error) {
|
|||
|
||||
buf := C.GoBytes(ptr, C.int(length))
|
||||
|
||||
// Cleanup
|
||||
// Clean up
|
||||
C.g_free(C.gpointer(ptr))
|
||||
C.vips_error_clear()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue