iwsfg / node-potrace

JavaScript port of Potrace, for NodeJS
GNU General Public License v2.0
185 stars 52 forks source link

Not flat #3

Open cyrilchapon opened 6 years ago

cyrilchapon commented 6 years ago

I have an image with 2 polygons.

When I run potrace, it serves a unique path with a M for breaking the 2 paths.

I'd need actually 2 paths. native Potrace has a --flat option. I tried

potrace.trace({
  flat: false
})

But it doesn't work. Is this intended ?

iwsfg commented 6 years ago

Such option is not supported at the moment. The way it renders SVG is pretty much set in stone now and does not allow for configuration.

No ETA, but I'll try to add this option when I get time. Hopefully this weekend

cyrilchapon commented 6 years ago

Great to hear :)

FYI in here we're using this module in production, not to posterize some memes in any way.

We're vectorizing WMTS raster tiles from a server that serves .png. This is a temporary step to convert png to Geojson ! :)

sodevrom commented 12 months ago

Hello, Any update on this ? I am using the original potrace on windows, and it splits the image in multiple paths. tare22 For example this simple text, converted using windows potrace (original one), returns an individual path for each letter.

With your library, it gives one single path for the entire image. Any solutions? Thanks!