-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[ui] Viewer2D: support all Exif orientation tags #1857
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this PR with the following images (https://github.com/recurser/exif-orientation-examples) and I noticed some issues for orientations 5 to 8, both in portrait and landscape images.
In landscape, the images with orientation tags of 5 and higher are "zoomed out" and displaced (not centered in the viewer). In portrait, it is the opposite: images with orientation tags of 5 and higher are "zoomed in".
I haven't checked in details where this might be coming from (maybe there is a specific issue with these images). With regular random images of different orientations, I didn't notice such an obvious displacement (but I noticed that images in general seem to be zoomed in, although it seems that this already occurred on the "develop" branch), and the feature viewer displacement that occurred for orientation tag 6 was fixed.
Should be fixed now :) |
dc9ec27
to
1709327
Compare
Description
The goal of this PR is to support all Exif orientation tags in the 2D viewer, which only handles tags 6 and 8 at the moment.
We also solved a bug with the features viewer not being at the right position with some orientation tag (noticed with orientation tag 6):
Implementation remarks
Historically the 8bit viewer had to be handled differently than the other viewers because it is backed by Qt Images which handle orientation at the C++ level (therefore in the qtAliceVisionImageIO plugin in our case).
This automatic transform has been disabled to make sure we can control all viewers with the same mechanism.
Tests
The float viewer, 8bit viewer and features viewer have been tested on all Exif orientations (including images with no orientation metadata) on several datasets.