jQuery filter.me is a jQuery dependant script that allows you to apply filters to images using Photoshop .acv Curves Adjustment files. jDataView is used to read the Photoshop file, from which we create a Monotonic Spline Curve representing its data. From this curve the new pixel RGB values can be calculated. These values are then applied using HTML5's canvas element.
Literally any Photoshop curves file can be applied to multiple images with ease. This is a great alternative to using something like PHP's imagemagick to try and replicate similar filtering. It can sometimes be a little slow, especially in mobile browsers, but I'm sure this will improve as canvas becomes more mainstream.
Two versions are available, so have a look below.
Adding the filters is easy. As normal, you'll have to load the scripts (and jQuery) into your site's <head> or in the footer before the </body>. To intiate the filters, use the script below:
Then we add the filter class to the image, alongside the filter data attribute.
<img src="photo.jpg" class="filter" data-filter="Nashville" />
And that's it. It should work immediately!
Below are the options you can set when initiating the plugin.
desaturate: false // Value from 0 - 1. 1 equals full desaturation (black & white).
curves: false // Object of RGB values in production script, or string name of curves .acv file in development script.
vignette: false // 'true' or 'false'. Add a vignette to the image.
folder: 'acv/' // Development script only. Location of the .acv folder, relative to the current file.
debug: false // Set to 'true' for script debugging. Logs information along execution in console.
Just some of the resources I've used to create jQuery filter.me. Wouldn't be possible without the great work of others!
I'm a 19 year old aspiring entrepeneur and web developer based in Dublin, Ireland. Having decided to turn down university in Ireland & the UK, I've set out to pursue startup success and make great connections. Love creating things with emerging web technologies, just for the pure challenge of it!
Currently I'm working hard with my first major venture, Riva Slider, which has proven very successful so far. I also hope to create more awesome tools in the future, and to prove that there is a life outside of third level education for young tech entrepeneurs here in Ireland. Please follow me and Riva Slider on Twitter! Feel free to fire any questions my way, I'd be happy to answer them.