Re: Failing to import a JPEG
Dinu Gherman <[email protected]>
| Newsgroups | gmane.comp.python.reportlab.user |
|---|---|
| Message-ID | <[email protected]> |
Andy Robinson <[email protected]>: > > Try leaving PIL completely out of it and just passing in the > filename....JPEGs can be inlined into the PDF directly... > > > def drawImage(self, image, x, y, width=None, height=None, mask=None, > preserveAspectRatio=False, anchor='c'): > """Draws the image (ImageReader object or filename) as specified. > > "image" may be an image filename or an ImageReader object. Gosh, that works! Thank you!! That will do for now... BTW, this is a nice, compact way of creating clean, throw-away Python environments for testing (here on OS X): wget https://repo.continuum.io/miniconda/Miniconda-latest-MacOSX-x86_64.sh bash Miniconda-latest-MacOSX-x86_64.sh -b -f -p ./miniconda2 ./miniconda2/bin/pip install -U pip ./miniconda2/bin/pip install reportlab ./miniconda2/bin/pip freeze ./miniconda2/bin/python my_test.py Cheers, Dinu