from PIL import Image

# Open the image
img = Image.open('resume.jpg')
width, height = img.size
print(f"Dimensions: {width}x{height}")

# Estimated coordinates based on standard visual proportions of the screenshot
# Let's crop the profile:
# Left: 10%, Top: 12%, Right: 42%, Bottom: 33% (roughly)
# Let's save a test crop of profile and cat to see if we get it right.

# Profile picture
left_p = int(width * 0.09)
top_p = int(height * 0.115)
right_p = int(width * 0.425)
bottom_p = int(height * 0.335)

profile_img = img.crop((left_p, top_p, right_p, bottom_p))
profile_img.save('profile.jpg')

# Cat picture
left_c = int(width * 0.71)
top_c = int(height * 0.465)
right_c = int(width * 0.905)
bottom_c = int(height * 0.605)

cat_img = img.crop((left_c, top_c, right_c, bottom_c))
cat_img.save('cat.jpg')

print("Cropped successfully!")
