”@

Home 

python Programming Glossary: maxheight

Server-side SVG to PNG (or some other image format) in python

http://stackoverflow.com/questions/2932408/server-side-svg-to-png-or-some-other-image-format-in-python

import cairo import rsvg def convert data ofile maxwidth 0 maxheight 0 svg rsvg.Handle data data x width svg.props.width y height.. dims are str width height print converting to str maxwidth maxheight yscale xscale 1 if maxheight 0 and width maxwidth or maxheight.. converting to str maxwidth maxheight yscale xscale 1 if maxheight 0 and width maxwidth or maxheight 0 and height maxheight x maxwidth..