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

galleria rotates a picture to landscape when switching to fullscreen #279

Open
anarcat opened this issue Dec 30, 2017 · 17 comments
Open

galleria rotates a picture to landscape when switching to fullscreen #279

anarcat opened this issue Dec 30, 2017 · 17 comments
Labels

Comments

@anarcat
Copy link
Contributor

anarcat commented Dec 30, 2017

There's something really odd with a picture I have. Some other pictures of mine don't have that problem, but for some reason, when I switch to fullscreen in galleria with this special picture, it gets flipped as landscape even though it was displayed, properly, in portrait mode, when in normal mode.

Worse: when I go back from fullscreen, the image is still squeeze to the side, like this:

snap-2017 12 29-22 57 14

It's as if something inside galleria was flipping the image. This happens only when I have keep_orig enabled, here's the (minimal) config to reproduce this:

theme = 'galleria'
autorotate_images = True
copy_exif_data = False
keep_orig = True

I do not have consent to publish the image, so I would prefer if I could send you a sample in private.

Other themes do not seem to have that problem. Setting keep_orig to False works around the issue as well. I can reproduce this in Firefox 57 and Chromium 63.0.3239.84.

@anarcat
Copy link
Contributor Author

anarcat commented Dec 30, 2017

interestingly, use_orig has no effect: when galleria flips to fullscreen, sigal tells it to load the original file, and that breaks the rotation immediately.

update: i mean use_orig = True, has no effect. phew, this is confusing!

@anarcat
Copy link
Contributor Author

anarcat commented Jan 1, 2018

and obviously, i can't reproduce this now anymore. Not sure what was going on with that picture, but sorry for the noise. :/

@anarcat anarcat closed this as completed Jan 1, 2018
@saimn
Copy link
Owner

saimn commented Jan 3, 2018

Hmm weird that this happens only in fullscreen. The image rotation stuff is confusing, but as long as Pillow does not allow to modify the exif after rotation (#72) there is no good solution.

@anarcat
Copy link
Contributor Author

anarcat commented Jan 3, 2018

yeah this is just totally weird, especially since i can't reproduce anymore. i wonder if there could have been some caching issues...

i'll bump this again if i have the problem again later.

@anarcat
Copy link
Contributor Author

anarcat commented Jan 5, 2018

oh and just another thought i had... one thing with image rotation is that browsers do know how to rotate images on their own. a portrait photo will get displayed vertically if opened directly (ie. not inlined in a <img> tag but directly loaded in the browser) but will be displayed sideways if inlined. it's super weird, and it could be what was happening here - maybe the original was being loaded when going to fullscreen, and then still used when popping back out of there....

@anarcat
Copy link
Contributor Author

anarcat commented Feb 8, 2018

okay well, this damn bug is back. and now i have public photos to show it, which might make things easier here...

https://photos.anarc.at/cities/montreal/#/3

Note that this photos is fine:

https://photos.anarc.at/cities/montreal/#/4

The difference? The latter was exported by Darktable, while the former is straight from the camera... Could this be why there is a problem here? That pillow wouldn't detect the proper exif tags from the camera?

@anarcat anarcat reopened this Feb 8, 2018
@saimn
Copy link
Owner

saimn commented Feb 8, 2018

I see both with the correct (vertical) orientation

@anarcat
Copy link
Contributor Author

anarcat commented Feb 9, 2018

even in full screen?

@anarcat
Copy link
Contributor Author

anarcat commented Feb 9, 2018

here's a screencast (zip file because github doesn't support video!) of the problem from my point of view, just to make sure we're on the same page. this is Build identifier: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0.

@saimn
Copy link
Owner

saimn commented Feb 9, 2018

Ok, I can also see this actually, but I need to wait long enough because my network is slow and the files are big and galleria shows the low res file while it downloads the high res! So maybe an issue with the fullscreen plugin ? It would be interesting to check in galleria's changelog or git repo is there is something. I think there is more recent versions than the one bundled in sigal, but last time I tried to update the design was broken.

@anarcat
Copy link
Contributor Author

anarcat commented Feb 12, 2018

yeah, i was wondering if this could be solved by a theme update as well... i can't imagine that galleria has such a huge bug and no one noticed (although I did look at their issue queue, iirc and couldn't find anything)...

@anarcat
Copy link
Contributor Author

anarcat commented Feb 12, 2018

my strategy right now is to wait for theme updates in sigal and try again :)

@saimn
Copy link
Owner

saimn commented Feb 12, 2018

You're lucky, I pushed a branch with the theme update yesterday, and I just merged it (#296) :)

@anarcat
Copy link
Contributor Author

anarcat commented Feb 12, 2018

nice, i guess i need to try this out now!

@anarcat
Copy link
Contributor Author

anarcat commented Feb 21, 2018

at first glance, this seems fixed in 1.4.0 - thanks!!!

@anarcat anarcat closed this as completed Feb 21, 2018
@saimn
Copy link
Owner

saimn commented Feb 21, 2018

Good news! :)

@anarcat
Copy link
Contributor Author

anarcat commented Jun 27, 2018

hmm... unfortunately, it seems I am still seeing this bug in 1.4.0, sorry for the false positive. :( it does not seem like Galleria 1.5.7 fixed the problem and i still see originals rotate all over the place...

@anarcat anarcat reopened this Jun 27, 2018
@saimn saimn added the galleria label Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants