🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

A simple jQuery plugin to pixelate images, because I miss my Nintendo and high-resolution graphics are for suckers.

Image Effects Plugins

Documentation

jquery.pixelate.js

A simple jQuery plugin to pixelate images, because I miss my Nintendo and high-resolution graphics are for suckers.

Check out the demo here.

Getting started

  1. Include jQuery and jquery.pixelate.js
  2. Apply the pixelate() function, a la:
$(document).ready(function() { 	$('img').pixelate(); }); 
  1. Revel in your newfound retro cred.

Options

Right now, jquery.pixelate.js exposes only two options, focus and canvasID:

  • focus (whose default is 0.5) takes a value from 0 to 1 which roughly corresponds to pixel density (where 'pixels' become larger as focus approaches 0).
  • canvasID (whose default is 'pCanvas') takes a string which designates the ID to be applied to the <canvas> elements generated by the plugin.

Credit

The general method comes from Ken Fyrstenberg's answer on StackOverflow.

License

MIT


You May Also Like