An AngularJS directive for cropping and resizing images using HTML5 canvas