Convert any image to vector graphic ?
Convert any image to vector graphic ?
Since I got some images I'd like to try and convert to vector images I'll just right out ask:
Is it possible to have Imagemagick create vector images from multiple lets say png's I have ?
Thanks for an answer in advance.
Is it possible to have Imagemagick create vector images from multiple lets say png's I have ?
Thanks for an answer in advance.
Version: ImageMagick-7.0.7-28-Q16-x64-static http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert any image to vector graphic ?
Sorry, no. IM can convert from vector to raster, but not raster to vector.
Inkscape can do this ("trace bitmap"), and other tools are available.
Inkscape can do this ("trace bitmap"), and other tools are available.
snibgo's IM pages: im.snibgo.com
Re: Convert any image to vector graphic ?
Can Inkscape batchprocess images ?
Version: ImageMagick-7.0.7-28-Q16-x64-static http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert any image to vector graphic ?
To some degree, though it is really an interactive program. I don't know if it can trace bitmaps in batch. Potrace (http://potrace.sourceforge.net/) may be better for you.
snibgo's IM pages: im.snibgo.com
Re: Convert any image to vector graphic ?
Well since Potrace obviously only converts images to black and white: http://potrace.sourceforge.net/mkbitmap.html
I shall try that even if it means I have to use my linux environment.
I shall try that even if it means I have to use my linux environment.
Version: ImageMagick-7.0.7-28-Q16-x64-static http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert any image to vector graphic ?
Potrace just finds edges and makes paths. You can use IM to do colour-separation first, then edit the SVG output from Potrace as appropriate.
If you supply a sample image and what you are trying to do with it, advice can be more specific.
If you supply a sample image and what you are trying to do with it, advice can be more specific.
snibgo's IM pages: im.snibgo.com
Re: Convert any image to vector graphic ?
According to this http://stackoverflow.com/questions/1132 ... magemagick Imagemagick can do it with autotrace etc. as support app ?
Image to test:
Image to test:
Version: ImageMagick-7.0.7-28-Q16-x64-static http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert any image to vector graphic ?
And what vectors do you want? If you want a load of small circles, negate the image first (eg with potrace "-i" or IM "-negate"). In potrace, you'll want "-t 0" to capture even the smallest stars. You'll probably also want to play with -k, --fillcolor and others. See potrace documentation.
snibgo's IM pages: im.snibgo.com
Re: Convert any image to vector graphic ?
However I need a colored vector image.
Can Potrace do this ?
Can Potrace do this ?
Version: ImageMagick-7.0.7-28-Q16-x64-static http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert any image to vector graphic ?
I do not think a raster image can be effectively vectorized? You will get millions of vectors if not a fault because there are too many. You probably cannot vectorize such a raster image, only ones with a few constant color regions. But I will defer to those others who know more about vectorizing.
Last edited by fmw42 on 2013-08-11T18:02:44-07:00, edited 1 time in total.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert any image to vector graphic ?
Potrace won't decide on the colours for the vectors.
snibgo's IM pages: im.snibgo.com
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Convert any image to vector graphic ?
The only effective vectorisation tool I have seen for colored images involves using vector data that is not available generally to vector images.
One example was a IFS (fractal generator) method that was never made public (tried to be commercial).
You example image for example would compress extremely well using a IFS image format, as it has a lot of fractal like information in it.
Another is the use of Diffusion Curves. which defines colors along edges, and then generated gradients from those colors.
http://maverick.inria.fr/Publications/2 ... /index.php
But no generally color images do not vectorise easilly, at least not without a lot of simplification, and color distortions.
One example was a IFS (fractal generator) method that was never made public (tried to be commercial).
You example image for example would compress extremely well using a IFS image format, as it has a lot of fractal like information in it.
Another is the use of Diffusion Curves. which defines colors along edges, and then generated gradients from those colors.
http://maverick.inria.fr/Publications/2 ... /index.php
But no generally color images do not vectorise easilly, at least not without a lot of simplification, and color distortions.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/