resize canvas to size of image and add in image process lib