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

[Bug]: Uploading a photo in portrait orientation automatically rotates it to landscape orientation after upload #1329

Open
3 of 4 tasks
ManikandanUV opened this issue Jun 16, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@ManikandanUV
Copy link

Requirements

  • Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a single bug? Do not put multiple bugs in one issue.
  • Is this a server side (not related to the UI) issue? Use the Lemmy back end repo.

Summary

https://lemmy.world/post/103993

Here's an example. I uploaded two photos, and they both got rotated automatically. You can check the linked imgur album to see how they appear normally.

Steps to Reproduce

  1. Create a post
  2. Upload a portrait oriented photo
  3. Click preview
  4. ???
  5. Profit

Technical Details

None that I know of

Version

BE: 0.17.4

Lemmy Instance URL

lemmy.world

@ManikandanUV ManikandanUV added the bug Something isn't working label Jun 16, 2023
@alectrocute
Copy link
Contributor

I think this is because we're stripping metadata off the image upon upload.

Can you share the file directly to your GitHub comment so we can compare?

@ManikandanUV
Copy link
Author

IMG_9468

Here you go

@Naomikho
Copy link

Naomikho commented Jun 21, 2023

I think this is because we're stripping metadata off the image upon upload.

Can you share the file directly to your GitHub comment so we can compare?

Someone in my community managed to reproduce the issue too, and it does seem to be due to the metadata. I hope this can help too
Before upload:
IMG_20230612_134408

After upload:
2d5c712f-69cb-4323-9760-0b0ae0b908c9
I checked the metadata of this image and the width and height are flipped. In the first image it's the other way round(as it should be).
94d99c63-798e-4a41-b417-0ab9a6180334

@Naomikho
Copy link

@alectrocute Sorry I forgot to mentioned in my previous comment, hope the stuff I posted helps. I'm not familiar with rust, pict-rs or magick so I can't figure out the reason behind this behaviour.😅

@Naomikho
Copy link

Naomikho commented Jul 9, 2023

Issue seems fixed with the latest lemmy update which is using pict-rs 4.0 :D

@KAMiKAZOW
Copy link

Issue seems fixed with the latest lemmy update which is using pict-rs 4.0 :D

Apparently not: https://lemmy.world/post/3097282

Uploaded after the 0.18.4 upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants