Read SVG file with Python/PIL

前端 未结 1 1132
情话喂你
情话喂你 2020-12-20 23:38

I\'m new to Python so please be patient with me.
Basically my script should run like this:

1) Load an image and split it into R, G, B channels
2) Mark an ar

相关标签:
1条回答
  • 2020-12-21 00:15

    You have to rasterize the SVG file to a bitmap and then you can superpose it to the original image using PIL, as it does not support vector images.

    I did some research some time ago, and the only library I found which supports this under python is cairo (again, maybe the landscape about SVG rasterizing tools changed in the last months).

    The other way around (I don't think this meets your requirements) is to apply your original bitmap image as a background to the SVG one, but this sounds soooo creepy... ;-)

    0 讨论(0)
提交回复
热议问题