Skip to content

Convert image to pixel art based on equidistant sampling method.

License

Notifications You must be signed in to change notification settings

zohoMatt/pixelit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pixelit

Convert image to pixel art based on equidistant sampling method.

Example

🖼️ Source image

🖨️ After processed

Getting started

Install

npm i pixelit

How to use

const pixelit = require('pixelit');

// Output to .svg file
pixelit('/file/path/raw-image.jpg', { pixel: 20, x: 40, y: 40 }, { path: '/output/path/for/image.svg' })
    .then(doSomething)
    .catch(errorHandler);

// Get HTML for the <svg> element
pixelit('/file/path/raw-image.jpg', { pixel: 20, x: 40, y: 40 }, { html: true })
    .then(html => doSth(html))
    .catch(errorHandler);

About

Convert image to pixel art based on equidistant sampling method.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published