1

I use PythonMagick in my project. When i convert SVG to JPG in command line like "convert x.svg x.jpg" it's ok. When i use PythonMagick i get all black image. I'm confused cuz i have that error only at 2 of 4 computers. They all have approximately similar libraries and OS ubuntu 16-18. Maybe someone can give me some tips what i do wrong. Here is my code.

tmp = tempfile.NamedTemporaryFile(delete=False)
blob = PythonMagick.Blob()
img = PythonMagick.Image('x.svg')
img.composite(img, 0, 0, PythonMagick.CompositeOperator.SrcOverCompositeOp)
img.write(blob, 'jpg')
tmp.write(blob.data)
  • 1
    The issue is likely which SVG renderer and their versions you have on each system. The options are: MSVG/XML (Imagemagick internal), RSVG delegate, or Inkscape (listed in order of quality of results). Check what you have on each system. – fmw42 Dec 06 '19 at 00:51

0 Answers0