from PIL import Image 

PATH = "data/yugo.jpg"

with Image.open(PATH) as img: 
    # originalna slika 
    img.show()

    # resize na dimenzije (500, 333)
    img1 = img.resize((500, 333))
    img1.show()

    # resize na dimenzije (500, 1000)
    img2 = img.resize((500, 1000))
    img2.show()

    img.resize((500, 1000), resample=Image.NEAREST).show()
    img.resize((500, 1000), resample=Image.BICUBIC).show()
    img.resize((500, 1000), resample=Image.BILINEAR).show()