[reportlab-users] renderPM.drawToFile(..., quality=?)
Dinu Gherman
reportlab-users@reportlab.com
Thu, 30 Jan 2003 11:02:20 +0100
Hi, I wonder how this code below for renderPM.drawToFile() would ever
make use of the "quality" argument when saving bitmaps as JPEG files,
say?
def drawToFile(d,fn,fmt='GIF', dpi=72, bg=0xfffffff, quality=-1,
showBoundary=rl_config.showBoundary):
'''create a pixmap and draw drawing, d to it then save as a file'''
w = int(d.width+0.5)
h = int(d.height+0.5)
c = PMCanvas(w,h, dpi=dpi, bg=bg)
draw(d, c, 0, 0)
c.saveToFile(fn,fmt)
Dinu
--
Dinu C. Gherman
......................................................................
"I can't understand why people are frightened of new ideas. I'm
frightened of the old ones." (John Cage)