Questions tagged [potrace]

Use this tag for potrace (the tool for transforming a bitmap into a smooth, scalable image) questions.

Potrace(TM) is a tool for tracing a bitmap, which means, transforming a bitmap into a smooth, scalable image. The input is a bitmap (PBM, PGM, PPM, or BMP format), and the output is one of several vector file formats. A typical use is to create SVG or PDF files from scanned data, such as company or university logos, handwritten notes, etc. The resulting image is not "jaggy" like a bitmap, but smooth. It can then be rendered at any resolution. Homepage: http://potrace.sourceforge.net/

20 questions
7
votes
2 answers

Installing PyPotrace on Windows 10

I would like to install Potrace on my Windows 10 Computer and I will be using it with python 2.7.5. I am following the installation instruction from this site.( https://pypi.python.org/pypi/pypotrace) for Windows. What I did so far I installed MinGW…
ben olsen
  • 663
  • 1
  • 14
  • 27
5
votes
2 answers

PNG with alpha-transparency to SVG with potrace

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…
Lolo
  • 61
  • 1
  • 4
2
votes
2 answers

How to use java for running an executable file portace to generate svg file from bitmap file

I have looked up on how to run an executable in java via Runtime process builder but it does not work. My code is as follows ... String command = "potrace --svg mb-finer-19.pbm -o mb-finer-19.svg"; try { File f = new…
user3310658
  • 61
  • 1
  • 5
2
votes
1 answer

Is it possible to compile potrace for iOS?

Looking at the cross-platform nature of potrace http://potrace.sourceforge.net/, is it possible to compile this for iOS? If so, how?
ninjaneer
  • 6,951
  • 8
  • 60
  • 104
1
vote
0 answers

Why is edge detection potraces default and how can I change that?

I have this as an example image: I use Python3 and PIL to convert it to a BMP so I can run these commands in a shell -> Python: from PIL import Image img = Image.open("./test3.png").convert("1") img.save("test3.bmp") Shell: mkbitmap test3.bmp -o…
Shmack
  • 1,933
  • 2
  • 18
  • 23
1
vote
1 answer

Images.png Manipulation to SVG in C#

iam using Imagemagick & potrace in c# to convert png to pnm and then to svg but unfortunately the SVG File comes with out colour! how i can solve the colour problem? should i use another converter? suggestions please? i have tried many packages in…
Sam
  • 31
  • 5
1
vote
0 answers

How to convert PNG/JPEG images to svg with ImageMagick?

It seems that with potrace installed, I can just run magick convert x.png x.svg or magick convert x.jpg x.svg.However this just returns a deformed image in black and white, and I need the svg image to be in full color. Additionally, I really need…
Adi B.
  • 37
  • 4
1
vote
0 answers

Replace positional argument with data

I am working on project which uses potrace which convert format .bmp to .svg and the its terminal code is potrace --svg -o The input .bmp images are generated from .png images using other algorithm. I…
bhjbhjqw
  • 11
  • 1
1
vote
2 answers

Execute Potrace command from C# code to convert bitmap image to XAML

I am trying to convert my bitmap image to XAML format. Currently I am using Potrace in command Prompt. I will be passing the input file through command prompt only. My problem is that I have to do the same using C# code. I have to call the Potrace…
Amr
  • 81
  • 3
  • 15
0
votes
0 answers

I'm looking for ways to convert Bezier curves into .svg images

I'm trying to use potrace in python to convert a directory of .pngs into .svgs. The .pngs in question are traced in black and white. The code I'm currently using traces just fine, but it outputs data as a bunch of coordinates of how steep the curve…
TOZ
  • 1
0
votes
0 answers

How to convert images to SVG using Python potrace and Imagemagick by batch or per folder?

Credits to @eprev for this conversion (per image) $ convert -alpha remove party-never.png pgm: \ | mkbitmap -f 32 -t 0.4 - -o - \ | potrace --svg -o party-never.svg I would like to have it in Python. Integrate in this code: from PIL import…
0
votes
1 answer

Extract contour of imageinto svg

I have png-images of a grayscale circle and background alpha I would like to extract the 50% contour (only the diagonal line) and export it as a path into an svg-image. Until now I tried to do this with ImageMagick and Potrace, but I was not able…
Paul Stahr
  • 41
  • 6
0
votes
0 answers

Export svg code to .svg file then upload local?

My code: var files = jQuery('#cargatulogo')[0].files; Potrace.loadImageFromFile(files[0]); Potrace.process(function () { svg = Potrace.getSVG(0.8); console.log(svg); }); result console.log(svg): I want to save it and upload it…
0
votes
0 answers

How to get straight lines svg from Potrace

Given an greyscale image already skeletonized by skimage.morphology.skeletonize or the bool array obtained. Original Image I'm trying to get an exact replica of image the in svg using Lines or Bézier curve but "open". So i tryed Potrace: Potrace…
Zorro
  • 1,085
  • 12
  • 19
0
votes
1 answer

PyPotrace pip Install Error on Jupyter Notebook

I am trying to install potrace in my jupyter notebook virtual env but I am running into this error code. I have looked around for any known fixes on jupyter notebook but I can't find any, does anyone know how to fix this? As per the first comment: I…
tman
  • 3
  • 2
1
2