resize and crop png file after resizing canvas
fixed typo in canvas aftersave() callback