from PIL import Image
# Open the extracted frame
img = Image.open(frame_image_path)
# Format for iPhone wallpaper: 1170x2532 (portrait)
iphone_size = (1170, 2532)
formatted_img = img.copy()
formatted_img = formatted_img.resize(iphone_size, Image.LANCZOS)
# Save as a new jpg
iphone_img_path = "/mnt/data/frame_com_rosto_iphone.jpg"
formatted_img.save(iphone_img_path, "JPEG")
iphone_img_path