from PIL import Image
# Putanje do slika
background_path = "/mnt/data/A_stylish_Instagram_background_image_with_a_sleek,.png"
foreground_path = "/mnt/data/file-QW5Pt7v4FkSB6ZhxEk4x7e"
# Otvaranje slika
background = Image.open(background_path)
foreground = Image.open(foreground_path)
# Promjena veličine foreground slike da odgovara backgroundu
foreground = foreground.resize(background.size)
# Kombinovanje slika uz laganu transparentnost foregrounda
combined = Image.blend(background, foreground, alpha=0.6)
# Spremanje rezultata
output_path = "/mnt/data/combined_image.png"
combined.save(output_path)
output_path