loadShape() throwing error when loading svg


#1

Hi,

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: .1.2.2.3.2.4,z
RuntimeException: shape command not handled: .1.2.2.3.2.4

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);
background(255);
noLoop();
}

void draw() {
PShape test;
test = loadShape(“1.svg”);
shape(test,10,10);
}

The SVG in question you find here:
https://drive.google.com/file/d/1o5CeJceIz3jkNo644APrIxdaMHoPxr9_/view?usp=sharing

Appreciate any thoughts on how to solve this.

thanks,
Peter


#2

-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…