Giter Site home page Giter Site logo

pixie's Introduction

PIXIE

Javascript PixelArt generator

Powered by OpenCV JS

This is a repository containg a simple code to automatically generate nice looking pixelart.

It provides the features of automatic pixellation with edge enhance to outline the edges of the images nicely. It also supports recolouring of the image with color palettes.

Live Demo

https://pixie-alpha.vercel.app/

Examples

alt text alt text
alt text alt text
alt text alt text
alt text alt text

FAQ

Why? Isn't just a resize of the image ?

No, because there is also a sharpening phase involved, otherwise the result would just look blurry instead

See this example

Original Simple Resize Pixie without recoloring Pixie
alt text alt text alt text alt text
Is my data safe ?

Yes, your pictures never leave your device. Network is only required to load the page.

Files

file description
pixie.js file with the pixellation code
opencv.js opencv dependency

API

// requires opencv.js 
function pixellate(imgElement, pixelSize, colors)
- imgElement: HTML image element of the page
- pixelSize: number of pixels of the original image to merge. Can be a float or int, from 0 to min(img.width, img.height)
- colors: list of colors in this RGB format
    if list is empty or undefined, no recoloring will be done. Otherwise recolouring using

API example

let example_palette = [[200,0,0], [0,200,0], [0,0,200]];
// add element to the page
let img = document.getElementById('img');

// create a canvas openCV object
let canvas = document.getElementById('canvas');

// call pixellate
// 10 is the pixel size
pixellate(img, canvas, 10, example_palette);

Credits

pixie's People

Contributors

bigemperor26 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.