Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I am working to add Potrace support to another program, but the output of Potrace leaves me a little stumped. How can I parse the output of Potrace into some format which my program can use?

0
Posted

I am working to add Potrace support to another program, but the output of Potrace leaves me a little stumped. How can I parse the output of Potrace into some format which my program can use?

0

To get parseable output from Potrace, I suggest using the -q and -c options. The default output is optimized for size, not readability. With ‘potrace -qc’, you should get exactly what you need. If you use the output from Potrace for processing by another program, I also recommend increasing the output resolution, e.g., -u=100 or -u=1000, to reduce the effect of roundoff errors. Note that the output coordinates correspond to input (bitmap) coordinates, multiplied by the unit length, then rounded to integers.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123