[reportlab-users] drawImage makes image roughly twice as big as it should be

Robin Becker robin at reportlab.com
Wed Jan 25 04:45:09 EST 2006


JP Glutting wrote:
> [Comment: This message seems to have become garbled on my end, so I am
> re-sending it. Apologies for dupicates]
> 
> I am trying to use drawImage to put a logo on all my reports. It works
> Ok, except that it is making the images larger than they really are, and
> they look lousy. I tried adding width and height specifically to the
> code, but it does not seem to change the output at all.
> 
> Any hints? I am not sure where to look for the problem. The code looks
> like this:
> 
> def myFirstPage(self, canvas, doc):
>       canvas.saveState()
>       canvas.drawImage("C:\\pybin\\Logo_UdL_w100.jpg", 75, 75,
> width=101, height=83)
>      .... [other stuff]
> 
> The original code didn't specify "width" and "height", but produced the
> same result. I also have an image on the header of every other page that
> does the same thing - spells up and gets pixelated. The image has a true
> width and height of 101 x 83 pixels, but prints out at 197 x 144 (based
> on using the select tool in Adobe Reader 7.0.
> 
> Thanks for any help!
> 
> JP
> 
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users
> 


-- 
Robin Becker


More information about the reportlab-users mailing list