No-Library (pure JS), HTML, CSS, JavaScript
jQuery 1.9.1, HTML, CSS, JavaScript
jQuery (edge), HTML, CSS, JavaScript
jQuery 1.6.4, HTML, CSS, JavaScript
jQuery wrapper for content trimming function
credit: http://stackoverflow.com/questions/5420384/convert-an-image-into-binary-data-in-javascript