from PIL import Image , ImageOps

PATH = "/home/cugur/Downloads/matf/dozs/2024/week2/data/yugo.jpg"

with Image.open(PATH) as img:

    img.show()
    # img - (1000, 666)

    img_v1 = ImageOps.pad(img, (1400, 800), color="#FFFFFF")
    img_v1.show()

    img_v2 = ImageOps.pad(img, (1100, 900), color="#BC50AE")
    img_v2.show()

    img_v3 = ImageOps.pad(img, (500, 500), color="#BCD534")
    img_v3.show()

    img_v4 = ImageOps.pad(img, (166, 111), color="#BCD534")
    img_v4.show()

    # Zadatak: Uvecati ulazni sliku za 15%.
    # Resenje: ako je ulazna slika bila dimenzija 1000x666, kada povecamo to za 15%, dobijamo: 1150x766 (sa malim zaokruzivanjem)
    img_v5 = ImageOps.pad(img, (1150,766), color="#FFFFFF")
    img_v5.show()

    # Ne moraju se dimenzije izlazne slike racunati "rucno":
    img_v6 = ImageOps.pad(img, (int(img.size[0]*1.15), int(img.size[1]*1.15)), color="#FFFFFF")
    img_v6.show()