How to convert BMP/PNG/JPG to SVG/EPS?
A simple tutorial which will take less than 3 minutes
The code below converts a raster image (in BMP or PNG format) to a vector in SVG, PS, PDF or EPS:<?php
$url = 'http://your_server.com/image.png';
$format = 'svg'; //or ps, eps, pdf
$data = json_decode(file_get_contents('http://api.rest7.com/v1/raster_to_vector.php?url=' . $url . '&format=' . $format));
if (@$data->success !== 1)
{
echo('Failed');
}
else
{
$vector = file_get_contents($data->file);
file_put_contents('vectors.' . $format, $vector);
}
This way we can convert this funny frog from PNG format:
to this SVG image:
Comments