-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rotation metadata #515
Comments
Hello @the-database, Yes, by default, pyvips will always present pixels to you as they are in the file. This means it can start processing sooner -- if it obeyed the rotation flag, it would need to decode the whole thing before it could give the first pixel to your program. If you must have pixels in display order, you can pass images through |
Thanks for the info, I didn't know about |
Ah you're right, your file has 8bim, xmp and iptc metadata encoded in PNG comment fields:
libvips doesn't decode these values, though it does pass them along. Your orientation value will be in an EXIF block inside one of these. |
Hi, thanks for this project, it is much faster than cv2 for loading small patches from large images for deep learning. I am trying to use it as a drop in replacement for cv2, but I found that the behavior differs from cv2 with respect to PNG images containing rotation metadata. Sample:
Input file with the rotation metadata: 0.615461_9766635431_20.zip
When I view
test_cv2.png
in my image viewer, it is in portrait orientation, whiletest_pyvips.png
is rotated 90 degrees clockwise. Am I doing something wrong, or is this behavior a bug with pyvips?The text was updated successfully, but these errors were encountered: