[reportlab-users] renderPM can't change resolution
Mon, 1 Dec 2003 23:44:14 +0000
In article <20031201203008.GA27630firstname.lastname@example.org>, Matej Pivoluska
>I want to render some custom plots for OpenOffice.org documents with reportlab.
>I written small PyQt application for simplify creation of these plots.
>And the problem is:
I've been meaning to fix the dpi stuff for about two years and now I
think I have. Setting dpi to 144 seems to double the linear sizes so I
guess it's working. You'll need some memory though :)
>renderPM module seems to be broken when it has to render image in other
>resolution than 72 dpi. I can set any resolution througt dpi parameter but it
>the saved image size is always the same. And when I open the image in Gimp I
>can see resolution 72 dpi in info dialog.
>I use renderPM renderer to get bitmap output. It is fixed at 72 dpi. I tested
>it with drawToString and drawToFile methods.
> from reportlab.graphics import renderPM
> renderPM.drawToFile(drawing, 'wow.png', fmt='PNG', dpi = 300 )
> img = renderPM.drawToString( drawing, fmt = 'BMP', dpi = 300 )
>reportlab-users mailing list