Skip to content
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

exif orientation tag not being respected #11

Closed
angelmanst opened this issue Aug 28, 2018 · 4 comments
Closed

exif orientation tag not being respected #11

angelmanst opened this issue Aug 28, 2018 · 4 comments

Comments

@angelmanst
Copy link

When seeing thumbnails and pictures in portrait that haven't been rotated (but have the exif orientation tag to rotate).
As you can see in the attached printscreen, two of the pictures should be rotated because they've been taken in portrait mode.
rotate_issue

From the first picture I have the following on the exif data:
exiftran -d 2016-07-28\ 09.34.32.jpg
2016-07-28 09.34.32.jpg
ifd 0
0x0112 Orientation Right-top
0x011a X-Resolution 72
0x011b Y-Resolution 72
0x0128 Resolution Unit Inch
0x0213 YCbCr Positioning Centered

When I use exiftran to process the picture with the "-a" option to apply automatic rotation according to the orientation tag, the pictures start appearing in the correct orientation (if I change their name because I'm assuming that since the thumbnail has been created before the change, pigallery2 woun't recreate the thumbnail and the thumbnail still appears in landscape).

@bpatrik
Copy link
Owner

bpatrik commented Aug 28, 2018

Hi,

Thank you the valuable feedback. As far as i understand there are 2 bugs. I shall fix both of them.
I got a bit busy lately (and also there is some other feature in progress) so it might take a long time (like months), sorry for that.

Patrik

@angelmanst
Copy link
Author

Thanks for the prompt feedback and for the great project.
I won’t be able to help much on fixing but I’ll try to help on testing and suggesting new features ;-)

@bpatrik
Copy link
Owner

bpatrik commented Aug 29, 2018

sure, thats ok. It should not take much time to fix them and its good enough that you made a nice bug report. :)

@bpatrik
Copy link
Owner

bpatrik commented Nov 2, 2018

Hi,

It turns out that this issue is relatively complex.

According to this: https://stackoverflow.com/a/36593389/10506897, and the official css specification: https://www.w3.org/TR/css-images-4/#the-image-orientation : browsers should support the auto image rotation based on exif data, but only firefox implements it.

Unfortunately, there isn't any nice solution to the problem currently.
I've made an update to the page, that it rotates the photos on client side with these commit: 92fca05 - 205f98e. It will be part of the next release.

Since the rotation happens on the client side, it might take a while. The page might not respond to any click during the process that might take up a 1-2s /photo.
If most of your photos need to be rotated it might be noticeable. If you have only a small fraction of your photos need to be rotated, it should be fine.

I can suggest you to use a 3rd party apps (like photoshop lightroom) to batch rotate your photos based on their exif tags. (Converting your photos also saves you some storage too.)

@bpatrik bpatrik closed this as completed Nov 21, 2018
bpatrik added a commit that referenced this issue Mar 7, 2024
* Show comma-separated city, state and country in infobox and in gallery mode. All of the values that are non-empty will be shown.

* methodcall to isPhoto

* Unit test and bugfix for CreationDate (#8)

* fixed the DiskManagerWorker test

* s (#10)

* Unit test and bugfix for CreationDate (#8)

* fixed the DiskManagerWorker test

---------

Co-authored-by: Patrik J. Braun <bpatrik@users.noreply.github.com>

* s (#11)

* Unit test and bugfix for CreationDate (#8)

* fixed the DiskManagerWorker test

---------

Co-authored-by: Patrik J. Braun <bpatrik@users.noreply.github.com>

* 9ij (#12)

* Unit test and bugfix for CreationDate (#8)

* fixed the DiskManagerWorker test

---------

Co-authored-by: Patrik J. Braun <bpatrik@users.noreply.github.com>

---------

Co-authored-by: Patrik J. Braun <bpatrik@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants