[reportlab-users] Patch: PIL images with ReportLab
Robin Becker
robin at reportlab.com
Thu Apr 28 12:32:54 EDT 2005
Sam Hunter wrote:
> Okay I think we can have cake and eat it too. With "ImageReader is the
> preferred image type" idea in mind, how about just a small patch which
> detects if a PIL image is passed to drawImage(), and if so, wraps it in
> an ImageReader object which has the patch I previous posted. This
> supports the idea of keeping ImageReader as the primary image type,
> allows PIL images to be used transparently, and streamlines things from
> the user's perspective. I also don't think that it should cause a
> problem for Java related usage?
>
> canvas.py, drawImage(self, image, x, y, width=None, height=None,
> mask=None):
> Original:
....
I think that's the general idea; the question is should we allow only
ImageReaders/filenames to be passed in or some other types ie where does the
wrapping take place in user space or in a hidden fashion inside the various
methods. I suspect the users will say wrap it for me and I'll want to make the
users do it :)
the difficulty for the internal wrap model is that if PIL then why not other
things. Or should we just say that the image reference passed in should be
acceptable to ImageReader's constructor?
--
Robin Becker
More information about the reportlab-users
mailing list