loadShape() throwing error when loading svg


I struggle with loadshape() when loading certain svg files. the files are created in icograms.com, and are perfectly readable in browsers and in inkscape.

parsed: m,51.4,41.9,c,0,.1,-.1.2,-.2.1,s,-.2,-.2,-.2,-.4.1,-.2.2,-.1,c
unparsed: .,z
RuntimeException: shape command not handled: .

It appears that loadshape works fine for certain elements of the svg, but when I add certain other elements, it throws error. In the below example it throws error because of the fountain. When I load the same svg with just the green, it works fine.

I run on processing 3.5.3 on windows 10.

My (highly complex) code:

void setup() {
size(1000, 1000);

void draw() {
PShape test;
test = loadShape(“1.svg”);

The SVG in question you find here:

Appreciate any thoughts on how to solve this.


1 Like

-a- yes here same
-b- but there is something strange with that file,
i open it in a online editor and see that:

left down playground picture?
this is not shown if you just view it…
the different programs can not all features, mostly ignore it,
ending as a warning in processing, but that seems to be a bad one

could you just download as a png and use PImage?
or convert it?
worst case view it and make a screen shot…

1 Like