You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

8bit

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

8bit

Transform images into pixelated versions using canvas

1.0.1
latest
Source
npm
Version published
Weekly downloads
7
-68.18%
Maintainers
1
Weekly downloads
 
Created
Source

8Bit Build Status

8Bit is a javascript module that converts an image into a pixelated version using canvas

Install

NPM

npm install 8bit

Bower

bower install 8bit
<script type="text/javascript" src="https://cdn.rawgit.com/rogeriopvl/8bit/master/8bit.js"></script>

Usage

var eightBit = require('8bit'); // only needed for NPM installs

var img = new Image();
img.onload = function () {
    eightBit(document.getElementById('mycanvas'), img, 10);
};
img.src = 'http://foobar.com/your_image.png';

API

  • eightBit(canvas, image, scaleFactor)
    • canvas - canvas element that will be used to place the pixelated version of the image
    • image - image HTMLElement to pixelate
    • scaleFactor - Number between 0 and 100, lower is more pixelated.

License

MIT (see LICENSE file)

Keywords

eightbit

FAQs

Package last updated on 29 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts