Cropping is back!

added util method so cropping is sensitive to dynamic size of canvas