I am trying to reduce the width and height of a vertical photo to fit an image into a tkinter canvas on my screen. However it appears that when I call width,size=background2.size with PIL that it automatically considers the larger of the two numbers it's width and places the image on the canvas at a 90 degree angle. Is there any way to override this so I get a smaller vertical image to fit my screen? Thanks.
background2 = Image.open(background)
width,height = background2.size
if width > 1350 and height >700 and width > height:
width = 1350
height = 700
resized_background = background2.resize((1350,700))
resized_background.save('C:\\Users\\Kurt\\Desktop\\resized_background.jpg')
elif width > 467 and height > 700 and height > width:
width = 467
height = 700
resized_background = background2.resize((467,700))
resized_background.save('C:\\Users\\Kurt\\Desktop\\resized_background.jpg')
This returns (5184,3456) for my background2 image when in reality it is (3456,5134).