I'm using reportlab to generate PDF documents from a python API. The documents include pictures (previously taken with a camera or mobile device) loaded with :
from reportlab.platypus import Image
img = Image(path)
story.append(img)
Problem : some images are not displayed with the right orientation (some EXIF data is probably lost or ignored at some point).
I encountered a similar problem with PIL once, and the solution I chose was to use Wand instead of PIL or Pillow, but it appears ReportLab only uses PIL to handle images with Python...
I found this code snippet from another question but I'm not sure how to edit reportlab to include it, or if it's a good way to go.
I'm surprised I didn't find anything on this subject, I can't be the only one wanting to include pictures in a reportlab-generated PDF...
Here is a picture with the original image opened in Preview on the left and the PDF on the right:
Thanks for any help, I've been struggling with that for hours now...