pil and reportlab: image compression

S

steph

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
 
S

steph

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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,816
Latest member
nipsseyhussle

Latest Threads

Top