I have images in horizontal and vertical orientation. What is the ideal way to resize and pad them to a common size. I tried padding all the images to maximum height and width available but that doesn’t give good results .