I'm resizing my images proportionally using this command:
from PIL import Image
basewidth = 700
im = Image.open('foto.png')
wpercent = (basewidth/float(im.size[0]))
hsize = int((float(im.size[1])*float(wpercent)))
im = im.resize((basewidth,hsize), Image.ANTIALIAS)
im.save("New_foto.png",optimize=True,quality=95)
Before I formatted my computer it was working perfectly. Now it's working in a way, but it's saving the photo with another position. Only pictures in portrait format, they pass as landscape, and I don't want that. Does anyone know what might be going on? I need install an additional package? Or how do I always save with the original position?