Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Well, you'll probably want to use the <a href="http://no.php.net/manual/en/book.imagick.php" rel="nofollow">ImageMagick</a> or <a href="http://no.php.net/manual/en/book.image.php" rel="nofollow">GD</a> functions. But be aware that you can't convert <em>from</em> PNG/JPEG/BMP <em>to</em> SVG, that's a one-way street.</p> <p><strong>Edit: Elaboration</strong></p> <p>Converting an SVG (vector) image to a PNG (bitmap) image is trivial. ImageMagick can do this for sure, and I'm fairly certain GD should be able to as well. If not, there are also PHP bindings for rsvg.</p> <p>Converting PNG (bitmap) to SVG (vector), on the other hand, is a whole 'nuther problem. The core of the issue is that a bitmap image quite simply contains less information than a vector image: Information about shapes, lines and structure in particular is flattened to pixel goop and irretrievably lost. In some cases, this information can be reconstructed, but never actually retrieved or rediscovered.</p> <p>Vectorization is merely a method for creating a new vector image based on a bitmap image, having the computer attempt to discover lines and shapes. This problem is far from trivial, and the process is certainly not perfect, nor even reliable in an automated setting.</p> <p>Only Jon Skeet can convert a PNG into an SVG.</p> <p><strong>Reedit:</strong> <em>Autotracing and personal experience</em></p> <p>Some time back I actually did do some work on tracing a raster image for some prototype-building of a small web-app (<a href="http://totlandweb.info/reiko" rel="nofollow">find it here, MNSFW, requires FFx/Safari/Opera</a>). Creating the vector was done using potrace to repeatedly tracing a thresholded black/white image to isolate elements and subsequently reconstructing the image by hand. It was a grueling process, but I was out of work at the time and had nothing better to do.</p> <p>Point is: Automatic tracing of raster images to produce vector images is hit-and-miss at best, and reliably getting good results requires</p> <ol> <li>A good source image</li> <li>A lot of effort</li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload