Coder Social home page Coder Social logo

node-potrace's People

Contributors

ertrzyiks avatar iwasawafag avatar iwsfg avatar tooolbox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

node-potrace's Issues

Is there a method that can take image data and return an SVG?

I’m trying to developing a bitmap tracing plugin for Sketch, and wondering if I can work out how to use node-potrace?

The Sketch API allows me to access an image’s ImageData https://developer.sketch.com/reference/api/#imagedata

ImageData is a wrapper around a native NSImage, allowing you to access the native NSImage or a native NSData representation of the image.

Is there a Potrace method that can take the image data as an argument and return an SVG string?

I can only see a description of how to use Potrace to convert images by supplying the path to an image file:

potrace.trace('./path/to/image.png', function(err, svg) {
  /*...*/
});

I’ve developed a few Sketch plugins before, but I’m a designer who likes to code, not a developer, so this might be harder than I can manage. If there is a straight forward way of making use of Potrace, I’d really appreciate your help.

License change possible?

Hi, would you mind update the license to GPLv3 or or license it as "GPLv2 or any later version"?
In our frontend project it's basically the only library which comes with GPLv2 from more than 1500 packages. Unfortunately GPLv2 doesn't play well with Apache2, at least the lawyers say so.

Not flat

I have an image with 2 polygons.

When I run potrace, it serves a unique path with a M for breaking the 2 paths.

I'd need actually 2 paths. native Potrace has a --flat option. I tried

potrace.trace({
  flat: false
})

But it doesn't work. Is this intended ?

STEPS_AUTO

Posterizer.STEPS_AUTO = -1;

It appears that the default value should be 1 and not -1. The validation in setParameters is looking for a number between 1 and 255.

if (params.steps && !Array.isArray(params.steps) && (!utils.isNumber(params.steps) || !utils.between(params.steps, 1, 255))) { throw new Error('Bad \'steps\' value'); }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.