resize

파이썬 이미지 resize 방법 / 가로, 세로 다르게 적용하기 PIL
from PIL import Image test = 'C:\\Users\\mnbv3\\Desktop\\IMG_2450.jpg' img = Image.open(test) print(img.width, img.height) # if img.width >= 1200 : # img_resize = img.resize((256, 256)) print(type(img.width)) if img.width >= 1200 : img = img.resize((1200,img.height)) if img.height >= 1200 : img = img.resize((img.width,1200)) print("수정 후 이미지크기 : ", img.size) #resize한 이미지 저장 img.save(test, "JPEG",..