Auto-Slide-Tool/cords.py

8 lines
259 B
Python

def center_on(image, location):
h = image.size[0]
w = image.size[1]
return (int(location[0] - (0.5 * h)),int(location[1] - (0.5 * w)))
def scale(image, amount):
return image.resize((int(image.size[0] * amount), int(image.size[1] * amount)))