[reportlab-users] Image Flowable and Raster Image Dimensions 1pt != 1px?!

Rich Andrews randrews at skylineinnovations.com
Thu Jan 21 00:56:59 EST 2010


So far so good with ReportLab/PLATYPUS but I've stubbed my toe one something
and can't find a solution in the doc/forum. And this is no doubt obvious.

An image, images/SampleGraph1.gif, is created in the filesystem: 50 by 50
pixels; 72 PPI (per GIMP). Both gif's and png's exhibit the observed
behavior.

A Flowable is subsequently constructed with the image.
Image('images/SampleGraph1.gif', 50, 50)

The image renders in the PDF larger than 50x50 it renders at about 77x77.

So if I construct the Flowable at (50/77) 32.45 x 32.45 things look proper
in the PDF.

Where I'm stuck is that if my image is 72 pixels per inch and there are 72
points per inch, then shouldn't things be 1 pixel per 1 point? If so, I
should be constructing the Image Flowable with 50x50.

Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20100121/9b167d4d/attachment.html>


More information about the reportlab-users mailing list