-
Notifications
You must be signed in to change notification settings - Fork 985
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
Apply orientation transformation based on EXIF data #1912
Conversation
cf7accb
to
a85d271
Compare
Just to clarify: all 8 new images are differently oriented, but they have the correct EXIF tag set, so the browser displays them properly. The issue can be reproduced if you try to |
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.
That seems good. The GH preview shows all image with the top left being red, can you add a detail in one of the test what is the exif data in each?
a85d271
to
d041b77
Compare
The number in an image filename indicates the value of the For reference, the image description is taken from an output of this command: $ exiftool -Orientation exif_5.jpg
Orientation : Mirror horizontal and rotate 270 CW You can get the raw value like this: $ exiftool -b -Orientation exif_5.jpg
5 |
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.
Small nits.
Do you have an example site where Zola was displaying things incorrectly after an op? Just to easily try this branch somewhere
1134c6c
to
ce83e08
Compare
Yep, you can clone this, and then open To build the blog you'll probably need git-lfs installed and zola Also when trying different versions remember to delete |
Alternatively, you can just use the test images from this PR, it'll probably be faster. The blog is pretty heavy. |
ce83e08
to
586a7ff
Compare
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.
Perfect, thanks!
* 'next' of github.com:getzola/zola: Apply orientation transformation based on EXIF data (getzola#1912) Stop printing invalid files in dirs fix windows EOL in markdown files (getzola#1911) Properly escape anchor names (getzola#1908) Allow new lines before anchor (getzola#1905) Fix incorrect documentation for syntax directory (getzola#1901)
Some images (especially photos) are stored with incorrect orientation. There is a EXIF metadata attached, so browsers and image viewers know how to display it properly.
Unfortunately, when applying transformations, this metadata isn't copied (see image-rs/image#1045 (comment)), so the only way to fix it is to apply the corresponding transform on the Zola's side.
Sanity check:
Code changes
next
branch?