pil and reportlab: image compression

steph stephan0h at yahoo.de
Fri Aug 27 07:23:36 EDT 2010


On 26 Aug., 13:16, steph <stepha... at yahoo.de> wrote:
> Hi group,
>
> I've written a small application that puts images into a pdf document.
> It works ok, but my problem is that the pdf-files become quite huge,
> bigger than the original jpegs. The problem seems to arise because I
> use PIL to resize the pictures - and the images seem to get
> uncompressed in the process. Unfortunately I have not found a way to
> compress them again before rendering them to the pdf. Any clues?
>
> Thanks,
> Stephan

Solved this by writung to anonymous mmap. Works nicely :-)



More information about the Python-list mailing list