Pixelate
Pixelates an image with canvas by scaling the image down and stretching. The original image src
is replaced with the canvas image dataURL
.
Demo
https://lab.miguelmota.com/pixelate
Install
npm install pixelate
Usage
Basic example:
var image = document;var pixelate = image amount: 07 // default: 0, pixelation percentage amount (range from 0 to 1);
Another example:
var image = ;imagesrc = 'images/street.jpeg'; var pixelate = image amount: 07;
Re-render with different amount:
pixelate;
Make it responsive:
window { pixelate;};
License
MIT