from PIL import Image

PATH = 'data/muva.jpg'

with Image.open(PATH) as img:

    # Originalna slika
    print('Rezolucija originalne slike je:', img.size)
    img.show()

    # Napravicemo malo "egzoticniji" reshape
    img2 = img.resize((400, 1000))
    img2.show()

    # Postoji vise tipova resample-inga:
    # Image.Resampling.NEAREST (0),
    # Image.Resampling.LANCZOS (1),
    # Image.Resampling.BILINEAR (2),
    # Image.Resampling.BICUBIC (3),
    # Image.Resampling.BOX (4)
    # Image.Resampling.HAMMING (5)
    img.resize((400, 1000), resample=Image.NEAREST).show()
    img.resize((400, 1000), resample=Image.BILINEAR).show()
    img.resize((400, 1000), resample=Image.BICUBIC).show()
