You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 jpegtran to correctly rotate the image before passing it to Prawn.
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: