[reportlab-users] Patch: PIL images with ReportLab
Robin Becker
robin at reportlab.com
Thu Apr 28 16:50:00 EDT 2005
Sam Hunter wrote:
......
> I am no expert on Python imaging libraries, but it seems like PIL is
> the biggest by far. ImageReader already uses it as the default handler
> for anything that isn't JPEG. If support for other things is needed it
> should not be too difficult to build that support into ImageReader to
> centralize special cases and avoid having them spread throughout the
> code as you rightly want to avoid. As far as I can tell, ImageReader
> already supports everything that the other image methods need, so it
> seems like a natural choice as container for all types of image.
>
> what do you think?
>
> Sam
>
..... so far as I remember we originally intended that the ImageReader class should be
a reader only. We used PIL internally to do conversions. It was never intended that we knew
anything about the images. That's why I feel reluctant to bring PIL "inside". Because
of earlier assumptions the internal code feels able to reject PIL if the pil format option
reveals the original image to be JPEG. I'm not an expert on PIL, but if PIL is a valid option
then we need to know what conversions etc etc are valid. At present (in the SVN code) we're
alllowing conversions based on the PIL mode and possibly wrongly have allowed the format to
leak into the internals. Before we used PIL internally. Now you propose making PIL a valid
image format. Suppose you read a JPEG using PIL and pass it into ImageReader. Do I believe the
given PIL or can I revert to the original semantics and use the file as a standard JPEG.
--
Robin Becker
More information about the reportlab-users
mailing list