Store the dimensions of the unpadded image in the metadata and use that info to display the valid region of the image.