mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-16 10:55:54 -07:00
feat: autorotate
This commit is contained in:
parent
0ae3ac43ce
commit
26b22e9a6f
28 changed files with 105 additions and 2 deletions
12
vips.go
12
vips.go
|
|
@ -272,6 +272,18 @@ func vipsRotate(image *C.VipsImage, angle Angle) (*C.VipsImage, error) {
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func vipsAutoRotate(image *C.VipsImage) (*C.VipsImage, error) {
|
||||
var out *C.VipsImage
|
||||
defer C.g_object_unref(C.gpointer(image))
|
||||
|
||||
err := C.vips_autorot_bridge(image, &out)
|
||||
if err != 0 {
|
||||
return nil, catchVipsError()
|
||||
}
|
||||
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func vipsTransformICC(image *C.VipsImage, inputICC string, outputICC string) (*C.VipsImage, error) {
|
||||
var out *C.VipsImage
|
||||
defer C.g_object_unref(C.gpointer(image))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue