Read SVG files - extracting the path
Sebastian Koblinger <[email protected]>
| Newsgroups | gmane.comp.python.image |
|---|---|
| Message-ID | <32268588.1286557192780.JavaMail.root@viefep18> |
Hi everybody! I'm new to Python as well as to this mailing list and this is my question: Is it possible to read a path provided by an SVG file, and based on that path, make a selection of an image? (Further I'd like to invert the selection and fill it with black.) Is that doable with PIL? AFAIK ImagePath can create a path object, but is there a function, a module, or anything else that reads the path of the SVG directly? I rawly could imagine to read the SVG as a text file, scan it for the "path" argument, read the subsequent tuples and make them a path object. The plan B I'm working on is to do it with GIMP, which is a bit tricky because GIMP procedures are only accessible via the gimp-python console as far as I have experienced. The hard facts: Python 2.6.5 with IDLE PIL 1.1.7 on Win XP Any hints are welcome. Sebastian _______________________________________________ Image-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/image-sig