views:

244

answers:

4

Does anyone know tell me a tool that actually works (I tried several, but none works), with support for color images. If some of his friends know how to implement this, or any component that makes (C #), I would be grateful.

Thanks for any help


The program below works, however, leaves all the files in black and white. I'm still looking for the perfect program.

Total Vectorize

+3  A: 

Converting bitmap graphics to vector graphics (for example, PNG to SVG) is a definitively non-trivial task, with no straightforward solution. Doing it the other way round - vector to bitmap graphics - is of course a simple process of rendering, and that's how things are usually done if you want both formats.

At its core, such a conversion requires complex and error-prone algorithms that analyse patterns in images. More complicated images will simply be impossible to decompose into vector graphics. The technical explanation is based on the fact that the information entropy of bitmap representations is guaranteed to be higher than that of vector representations, which means there is always uncertainity in reversing the well-defined process of vector graphics rendering.

The best program widely available for your task is likely to be Vector Magic (shareware). If that doesn't do the job for you, it's not likely anything will, though of course you'll probably need a lot of tweaking for good results.

Noldorin
Wouldn't the trivial solution be to map each pixel of the input file to a square in the corresponding (relative) position with the same color? It would look like crap when scaled, just like a scaled jpeg would, but it would work, no?
Mark Peters
Sure, but you're still effectively using a bitmap format, just masking it under the guise of a vector format. It certainly doesn't make the image freely-scalable, as I'm sure you realise.
Noldorin
In addition, this would make the image many, many times the size of its gif or jpg counterpart, as each pixel would get a full node in the vector image. Not a really viable solution.
Pekka
+3  A: 

This process is know as vectorization. It is process of converting bitmap image to vector image. There are many tools, including free, that can do this, for example http://inkscape.org/

But the result of such processing is far from perfection.

Hope this helps. Maybe I got your answer wrong, and you need to convert bitmap image to vector programmaticaly, or you're asking how to embed bitmap image into SVG image.

STO
Sure, though Inkscape doesn't do a particularly good job of it from what I know.
Noldorin
Gotta be better than an all-black result.
Hans Passant
+1  A: 

SVG is Scalable Vector Graphics, which effectively means drawing lines. The format is inimical to displaying an image, which is fundamentally a matrix of pixels. Lines can easily be converted to pixels, but displaying pixels as lines (or dots) is wildly inefficient and not really scalable. The alternative of attempting to discover lines within a pixilated image is fraught with peril.

If what you want is simply to recover a non-scalable image in SVG format, you might find a tool to do that. But since scaling is what SVG is for, I wanted to be sure you understood why you might have difficulty.

Norman Ramsey
A: 

Vector Magic is by far the best tool that I know for this task. However, you can only apply vectorization for a limited number of images, after that you have to subscribe or buy a license for the desktop edition.

Alceu Costa