from PIL import Image

PATH = "data/yugo.jpg"

# Nacin 1
img = Image.open(PATH)

img.load()
print(img)
print(img.format)
print(img.size)
print(img.mode)
img.show()

img.close()  # Eksplicitno se poziva 

# # Nacin 2
# with Image.open(PATH) as img:
#     img.load()
#     print(img)
#     print(img.format)
#     print(img.size)
#     print(img.mode)
#     img.show()

#     # img.implicitan close()


