[Image-SIG] PIL's PDF export dpi

Matthias Bock matthiasbock at users.sourceforge.net
Thu Jan 26 18:47:49 CET 2012

Dear all,

Python's Imaging Library PIL seems to ignore
image resolution settings, when saving as PDF.

Sample code:

 # -*- coding: iso-8859-15 -*-
 from PIL import Image
 im = Image.open('demo.png')
 im.info['dpi'] = (300,300)
 im.save( 'demo.pdf', **im.info )

The (300,300) statement I added to set the resolution
to 300 dpi, but nevertheless the output PDF only has 72 dpi.

Can anybody help me out here ?

Best, Matthias

More information about the Image-SIG mailing list