fix bug of calculate padding of images. Now can read the user's input
positions on image.