|
|
|
|
|
by vic1102
276 days ago
|
|
I ran into the same issue when working with image processing in Go using libvips.
By default, libvips ignores EXIF orientation too, so I had to explicitly read and apply the orientation tag before doing any resize or crop. Otherwise users ended up with upside-down processed images from photos.
Glad to see this is getting better in Rust. |
|
VipsImage *image = vips_image_new_from_file("something.jpg", "autorotate", TRUE, NULL);
and it'll flip it upright for you and remove any EXIF orientation tag. It isn't the default since it has (obviously) a large memory and cpu cost.
For simple resize and crop it's much better to use the exif tag to adjust the resize and crop parameters (the vipsthumbnail command does this).