I'm using potrace to convert a png file to svg. The png is black on transparent background with alpha-transparency levels. I would like to report them in the svg output. Is it possible ? Potrace skips the alpha-transparency and turns it to black.
Here is my command:
convert -alpha Remove file.png pgm: | potrace --svg -o file.svg
PNG : https://i.stack.imgur.com/aeUay.png
SVG output (.svg in reality but you can see directly the result in png) : https://i.stack.imgur.com/fWOy5.png
Thanks !
@Lolo. I don't think a pipeline with
potrace
alone can do what you want. From the manpage:@philippe_b. I ran into the same problem as you, i.e.
gave me an all black output image. Incidentally, this was actually happening at the PNG->PBM stage. My images had transparent alpha. This is my working solution
Here's a script to do it in batches