HTML5 Canvas cropping utility