How does Autorotate followed by StripMetadata operation work? #2040
Unanswered
rapidcoder7
asked this question in
Q&A
Replies: 1 comment
-
Hello @rapidcoder7, libvips 8.9 only supports the EXIF orientations which are pure rotation. Orientation 4 has a flip as well. libvips 8.10 (git master) supports all EXIF orientations and should be out soon. There's an rc2 here: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
My goal is to strip the metadata from an image. But before stripping the metadata I am auto rotating an image to ensure the resultant image is upright.
However, I have observed that the resultant image isn't upright. I first Auto rotate and then strip the metadata. Below is my sample code.
ref, err := vips.LoadImage(bytes.NewReader(imgBytes)) err = ref.Autorot() if err != nil { return nil } destImg, _, err := vips.NewTransform().Image(ref).StripMetadata().OutputBytes().Apply() if err != nil { return nil } // Write destImg to file
I am using GoVips https://github.com/davidbyttow/govips
Note, in the attached image the Orientation is set to 4.
Beta Was this translation helpful? Give feedback.
All reactions