Python Image Cropper for Time Lapses

While making my Pasta Machine, I took quite a few screen grabs of the CAD. I wanted to make a time lapse of all the images, but cropped such that they did not include the solidworks headers and my other monitors. I tried doing the cropping in Windows Movie Maker with no luck. I was able to crop all the photos in Adobe Premier Elements, but at a huge cost of resolution (the photos got scaled down to 240p or something stupid). So I built a pyhton script to crop all the images automatically.

# Time Lapse Image Cropper
# used first for Pasta Machine

from PIL import Image

center = 1400
halfX = 600

top = 130
bot = 970

img_list = ["1.png", "2.png", "3.png", "4.png", "5.png", "6.png", "7.png", "8.png", "9.png", "10.png",
"11.png", "12.png", "13.png", "14.png", "15.png", "16.png", "17.png", "18.png", "19.png", "20.png",
"20.png", "21.png", "22.png", "23.png", "24.png", "25.png", "26.png", "27.png", "28.png", "29.png",
"30.png", "31.png", "32.png", "33.png", "34.png", "35.png", "36.png", "37.png", "38.png", "39.png",
"40.png", "41.png", "42.png", "43.png", "44.png", "45.png", "46.png", "47.png", "48.png", "49.png",
"50.png", "51.png", "52.png", "53.png", "54.png", "55.png", "56.png", "57.png", "58.png", "59.png",
"60.png", "61.png", "62.png", "63.png", "64.png"]

for i in range(len(img_list)):
	img =[i])
	area = (center-halfX, top, center+halfX, bot)
	cropped_img = img.crop(area)  #if you want all the images to show up
	new_title = "a" + img_list[i]
	print (new_title)