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

Image orientation not detected in compose UI #1068

Closed
muesli opened this issue Mar 23, 2019 · 24 comments
Closed

Image orientation not detected in compose UI #1068

muesli opened this issue Mar 23, 2019 · 24 comments
Labels
🧠 Backend Related to server logic and execution 🐛 Bug Something isn't working 👀 UI An issue with the interface / frontend 💼 WIP This is currently being worked on

Comments

@muesli
Copy link

muesli commented Mar 23, 2019

Trying to upload portrait photos, the orientation doesn't get correctly detected and they're displayed as landscape both in the "Create Post" dialog as well as on the feed once uploaded.

@trwnh trwnh added the 🐛 Bug Something isn't working label Mar 23, 2019
@dansup dansup added ⚙️ Deployment Related to specific deployments or configurations and removed 🐛 Bug Something isn't working labels Mar 24, 2019
@dansup
Copy link
Member

dansup commented Mar 24, 2019

@muesli We need more information, what instance was this on? If it was on your instance, is horizon running? Are you sure the exif data contains the proper orientation?

@muesli
Copy link
Author

muesli commented Mar 24, 2019

Sorry, should have mentioned that: this is on pixelfed.social.

From EXIF:
"Image Orientation: 6"

Also, Mastodon correctly identifies the image orientation.

@MasterGroosha
Copy link
Contributor

Can confirm. I should also note that using "rotate" in any image viewer in Windows and then rotating back makes Pixelfed.Social show correct orientation for uploaded photo.

@FanchTheSystem
Copy link

any news on this ?

@dansup dansup added 🐛 Bug Something isn't working 👀 UI An issue with the interface / frontend 🧠 Backend Related to server logic and execution and removed ⚙️ Deployment Related to specific deployments or configurations labels Jun 24, 2019
@dansup dansup closed this as completed Jul 18, 2019
@muesli
Copy link
Author

muesli commented Jul 18, 2019

@dansup Does that mean this has gotten fixed recently?

@muesli
Copy link
Author

muesli commented Jul 18, 2019

Just a heads up, tried it again and still not working on pixelfed.social.

@trwnh
Copy link
Member

trwnh commented Jul 18, 2019

Can you provide an example of a photo that gets uploaded with the incorrect rotation?

@muesli
Copy link
Author

muesli commented Jul 18, 2019

dsc00551

image

@muesli
Copy link
Author

muesli commented Jul 18, 2019

Great, of course GitHub fails at rotating the image, too 😆

Regardless of that, any photo viewer, instagram, flickr or Mastodon will correctly render the photo, respecting the provided EXIF Orientation information.

Edit: Click the upper photo and your browser will also correctly render the original file. I guess GitHub just strips the EXIF headers from the thumbnail.

@trwnh
Copy link
Member

trwnh commented Jul 18, 2019

image

Cannot reproduce

@trwnh
Copy link
Member

trwnh commented Jul 18, 2019

OK, I think I managed to reproduce somewhat...

  • Clicking the image to load the full size shows correct orientation

    • File manager shows correct orientation
    • Compose box shows correct orientation
    • Final post shows correct orientation
  • Saving the thumbnail directly...

    • File manager shows correct orientation
    • Compose box shows incorrect orientation
    • Final post shows correct orientation

So that image is only incorrect on Github and in the compose UI. Weird...

@muesli
Copy link
Author

muesli commented Jul 18, 2019

Well, what can I say? It seems to be working for me now, too, which makes me think pixelfed.social just got updated?

Glad I provided a screenshot of what was happening for me until a few minutes ago on pixelfed.social in the comment above, otherwise I'd doubt my own sanity now 😆

@trwnh
Copy link
Member

trwnh commented Jul 18, 2019

It may also be a browser thing? https://phiffer.org/etc/exif-orientation-test/

@muesli
Copy link
Author

muesli commented Jul 18, 2019

Uhm... no. It's only working sometimes. This is hella confusing. Tried the next photo from the set and it's showing up incorrectly again. (I think I may have opened the photo of the old man in a photo viewer that adjusted the orientation "silently")

dsc00567

@muesli
Copy link
Author

muesli commented Jul 18, 2019

Also a heads up: even when it's showing up correctly, the filters of the image show a stretched version of it.

@trwnh
Copy link
Member

trwnh commented Jul 18, 2019

the weird stretch is a regression (i distinctly remember fixing that bug in the past). but i'm not sure what's going on with the EXIF. again, it only has the wrong rotation in the preview and on Github thumbnails.

direct download thumbnail download
test test2
image image
image image

@trwnh
Copy link
Member

trwnh commented Jul 18, 2019

One other weird thing is that the "Orientation" seems to be set properly, but the Maker Notes includes two entries for "Rotation"...

image

image

@trwnh trwnh reopened this Jul 18, 2019
@trwnh
Copy link
Member

trwnh commented Jul 18, 2019

Also in Chrome I can get both the correct and incorrect rotations (depending on whether I downloaded the thumbnail or direct link).

@trwnh trwnh changed the title Image orientation not detected Image orientation not detected in compose UI Jul 18, 2019
@trwnh
Copy link
Member

trwnh commented Jul 18, 2019

At any rate, I feel like this is happening only in the Compose UI so I've reopened it and changed the title for now.

@jacotec
Copy link

jacotec commented Jul 18, 2019

I gave Pixelfed a try today, set it up and it looks very promising. But this bug is the first "No-Go" yet which I've discovered with my first test post ;-)

Uploaded 4 Photos directly from my iPhone, having my Pixelfed site open in Safari. The orientation is shown correctly on the iPhone!

But on other Browsers (MAC/Safari, MAC/Chrome) one is correct, two are lying "on the side" as already shown here before, one is "head over" 180° wrong. It seems the orientation information seems not to be recognized by Pixelfed.

Also when I click "edit" on my post in the browser view, I can't see the pictures, every picture space shows just "No Preview Available".

@trwnh trwnh added this to the 0.12.0 - Polish milestone Aug 21, 2019
@varjolintu
Copy link

I'm also having this problem. A raw picture from iPhone, and its orientation is detected by macOS QuickLook and Preview (plus other software). Uploading the image to Pixelfed fails to detect the correct orientation. The image is always turned 90 CCW.

@dansup dansup added the 💼 WIP This is currently being worked on label Jan 30, 2020
@dansup
Copy link
Member

dansup commented Apr 14, 2020

I'm going to close this issue as the latest ComposeUI is able to rotate the image before posting the status!


Screen Shot 2020-04-13 at 10 42 03 PM

Screen Shot 2020-04-13 at 10 42 33 PM

@dansup dansup closed this as completed Apr 14, 2020
@MasterGroosha
Copy link
Contributor

MasterGroosha commented May 9, 2020

@dansup Unfortunately, this is not a solution.
изображение

Here is the same image. The left one was rotated in Pixelfed. In this case I cannot rotate without cropping. 16:9 mode allows only horizontal rectange, not vertical, so that most of the image is lost. The closest option is 1:1 crop, but that's obviously not a solution.

The image on the right was rotated using some Windows image viewer (any viewer, honestly).

Please re-open the issue. ComposeUI is worse than rotating before upload, unfortunately.

@MasterGroosha
Copy link
Contributor

изображение

At least a cropping rectange can be fixed by making it switch from "horizontal" to "vertical" regardless of rotation angle (90, 180, 270...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧠 Backend Related to server logic and execution 🐛 Bug Something isn't working 👀 UI An issue with the interface / frontend 💼 WIP This is currently being worked on
Projects
None yet
Development

No branches or pull requests

7 participants