govno_python
govno_python

Reputation: 51

PythonMagick. All black image bug

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)

Upvotes: 1

Views: 55

Answers (0)

Related Questions