Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
API to convert image url to SVG over http
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
files
lib
test
.gitignore
package.json
readme.md

readme.md

vectogr.am

API to convert image url to SVG path over http.

install

  npm install vectogram

how do I use this?

run a vectogram server instance

var Vectogram = require('vectogram');

var options = { port: 80, host: '127.0.0.1' };

var server = new Vectogram(options) //start up the server

now you can make http requests to this server.

Resource:

  • GET http://127.0.0.1/url_to_image

parameter:

  • pathonly (optional - defaults to false)

values:

  • true
  • false

Example http client request:

var http = require('http');

var options = { 
  host: '127.0.0.1'
, port: 80
, path: '/v1/' + 'http://www.google.com/images/srpr/logo3w.png'
};

var request = http.get(options, function (res) {
  var reply = '';
  res.on('data', function (chunk) {
    reply += chunk;
  });
  res.on('end', function () {
    console.log(reply);
  });
});

request.on('error', function (e) {
  console.log('http client error:', e)
});
Something went wrong with that request. Please try again.