-
Notifications
You must be signed in to change notification settings - Fork 688
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
png Exif orientation metadata ignored #1271
Comments
Thank you for the report. Unlike JPEG, PNG is not a natively supported format in PDF. Prawn embeds JPEG images as is into the resulting PDF because JPEG is a natively supported format and all renderers should handle it properly. PNG, on the other hand, needs preprocessing. This is indeed a bug/missing feature of Prawn. |
Hey folks! I have an issue with JPEG images' orientation. The situation is next: I have a service which uses prawn for pdf generation(obviously) and I upload some photos made by phone in portrait orientation. However, it is in landscape orientation in a pdf. Sorry if my message is out of the current conversation scope. I would appreciate it if you confirm the issue or point me to where I'm wrong. |
@volart It is probably the same problem. The JPEG is stored in landscape orientation and there is only some metadata telling viewers to correctly rotate it on display. In this case I would run a tool like |
This is a feature request rather than a bug. PNG with Exif orientation metadata (like from a phone or scanner that says the image is rotated 90 degrees) is ignored. So images are always inserted in its original orientation, and not according to Exif orientation metadata.
I'm mostly posting this in case someone searches for why PrawnPDF is rotating their PNG files but not their JPEGS after modifying the PNG in Mac Preview. Also for more info: https://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto/
The text was updated successfully, but these errors were encountered: