Program to Convert PNG to SVG files ??

Hi,

I’m searching for a program to convert over 1000 PNG-files to SVG-files .

I know you can use Phatch for converting but it can not convert png to svg.
Another option is open the png-files with inkscape and save as svg-files but that shall take
years to do because like i said there are over 1000 files to do.

Is there somebody that can help me with this problem?

Greetings ,
Qbashi

qbashi wrote:
> I’m searching for a program to convert over 1000 PNG-files to SVG-files

Sorry to say so, but it is unlikely that you will find such an application.
And if you do its usage most likely won’t make much sense.

You might want to think again about the differences between raster and
vector graphics. They contain totally different content. Creating a vector
graphic (".svg") that contains a small texture taken from a raster graphic
(".png") might technically be possible. Where what for ? You will not be
able to use it like a real vertor graphic, since you cannot scale it, which
is the main point for using vector graphics.

arkascha

What is explained by arkasha is true : this conversion does not make much sense. However it is still possible with Image Magick. Group your images in a directory and create the following small script (and make it executable) :

#!/bin/sh

convert a series of *.png images in *.svg

for x in ls -1 *.png
do
y=echo $x | cut -d "." -f1
echo “convert $x into $y.svg”
convert $x $y.svg
done

exit 0

It will convert all your png into svg. But as shown on this example the difference in size may look a bit stupid :

-rw-rw-r-- 1 bz users 33131 Jan 15 10:13 floor_plan.png
-rw-rw-r-- 1 bz users 40878977 Jan 15 10:18 floor_plan.svg

On Sun, 15 Jan 2012 15:39:52 +0530, Arkascha
<arkascha@no-mx.forums.opensuse.org> wrote:

> qbashi wrote:
>> I’m searching for a program to convert over 1000 PNG-files to SVG-files
>
> Sorry to say so, but it is unlikely that you will find such an
> application.
> And if you do its usage most likely won’t make much sense.
>
> You might want to think again about the differences between raster and
> vector graphics. They contain totally different content. Creating a
> vector
> graphic (".svg") that contains a small texture taken from a raster
> graphic
> (".png") might technically be possible. Where what for ? You will not be
> able to use it like a real vertor graphic, since you cannot scale it,
> which
> is the main point for using vector graphics.
>

i remember from really long ago, 20 years or so, there used to be one of
the early corel draw versions (under windows) that was able to scan pixel
graphics into vector format, more or less accurately, depending on the
graphic, of course.

i haven’t needed this since and don’t know if this functionality is
available with any of the svg graphics applications, like inkscape, per
example. wouldn’t surprise me though. not a dedicated application for that
purpose probably, but if the (hypothetical) app. allows for scripting, you
might be able to go through your .png files pretty quickly.

in any case, this is error-prone and would probably make it necessary to
edit the resulting svg files after their “conversion.”


phani.

It would appear what you are looking for is a raster graphics to vector graphics conversion.
A quick Google search finds that COREL still exists for Winx, big $s.
A Linux application, potrace, is available in SuSE repo and may do what you want, but not clear if it can do it in batch mode.
Good luck, let us know if it works for you.

A lot depends on the number of colours but I have successfully converted several bitmap images into SVG using Inkscape. You have to select the number of scans which gives you a stack of different coloured layers on top of the original. You need to get rid of the original bitmap image and avoid getting rid of the ‘background’ layer.

Assume that you need to have several goes, altering the number of scans, until you get the result you want but it certainly works, very easily with, for example, logos which have only a few colours.

You can Try Pac-n-zoom.com and can even get a Bulk Discount for processing them although the service is currently free but with the huge amount of images that you require you might need it but I am not sure. This is there email customer.support@Pac-n-Zoom.com and you can tell them about this forum post.