from PIL import Image 

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

# funkcija deluje sa kontrastom k na vrednost piksela p 
def contrast_util(p, k):
    return p * k 

def contrast_05(p):
    return contrast_util(p, 0.5)

def contrast_5(p):
    return contrast_util(p, 5)

with Image.open(PATH) as img:

    img.load()

    img1 = img.convert("L")
    img1.show()

    img2 = img1.point(contrast_05)
    img2.show()

    img3 = img1.point(contrast_5)
    img3.show()


