-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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 Report: File preview endpoint flips image #8209
Comments
Hmm this might be an iOS bug 🧐 |
What's confusing me is the fact that this is not reproducible in versions prior to 1.5. So something must have changed in regards to how Appwrite handles images? |
I can see in Appwrite code where it check the Orientation Exif and it only deals with rotation (left, right and down) and ignores other kinds of Exif orientations like mirrored up, Mirrored down etc (Code here --> https://github.com/utopia-php/image/pull/19/files) .. Below link provides all JPG Exif orientation scenarios. Odd thing even the scenarios Appwrite checks for don't work. So preview API endpoint is doesn't work if JPG has any orientation Exif. Storage Preview API endpoint hopefully, if it fully addresses this issue, should also introduce additional image manipulation i.e., flip vertical/ flip horizontal which the, currently, un-tackled Exif orientation requires. https://www.galloway.me.uk/2012/01/uiimageorientation-exif-orientation-sample-images/ |
ya, i can confirm the image isn't flipped in 1.4.4:
Logically, not much has changed between 0.5.4 and 0.6.1. 😵💫 |
I just tested Appwrite 1.4.14 and the image still looks okay: Appwrite 1.4.14 uses utopia-php/image version 0.6.1 so the image library isn't the problem 😕 My theory now is something changed in the base image: appwrite/docker-base@0.4.3...0.9.0 |
@byawitz, did some tests and it seems like the version of imagemagick in our base image had a bug and upgrading it should fix the problem. On our end, looksl ike we just need to generate a new image. |
👟 Reproduction steps
I have this image that is normal when using the file view endpoint and flipped when using the file preview endpoint
File view:
https://cloud.appwrite.io/v1/storage/buckets/6603d55cba54c384dd55/files/6603d565014591781c7a/view?project=65fae85dcbef6b0998bf
File preview:
https://cloud.appwrite.io/v1/storage/buckets/6603d55cba54c384dd55/files/6603d565014591781c7a/preview?project=65fae85dcbef6b0998bf
Some info:
👍 Expected behavior
It should not flip the image in the preview endpoint unless specified
👎 Actual Behavior
The image is flipped
Related thread:
https://discord.com/channels/564160730845151244/1220007527626964992
🎲 Appwrite version
Appwrite Cloud
💻 Operating system
Linux
🧱 Your Environment
No response
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: