from PIL import Image
# Buka gambar
img = Image.open("IMG-20250807-WA0018.jpg")
# Tentukan area potong (left, upper, right, lower)
# Ini nilai contoh, bisa disesuaikan tergantung ukuran asli dan posisi orang
width, height = img.size
left = int(width * 0.3)
right = int(width * 0.7)
upper = 0
lower = height
# Potong gambar
cropped_img = img.crop((left, upper, right, lower))
# Simpan hasil
cropped_img.save("hasil_crop.jpg")
cropped_img.show()