Skip to content

Instantly share code, notes, and snippets.

@Andrew-Pynch
Created March 22, 2020 01:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Andrew-Pynch/d0097cd71b97d3214157dfbe21319ba2 to your computer and use it in GitHub Desktop.
Save Andrew-Pynch/d0097cd71b97d3214157dfbe21319ba2 to your computer and use it in GitHub Desktop.
def crop_lower_half(fnames): # fnames is a list of jpg names in a folder
for i, file in enumerate(fnames):
cropped_image = crop(open_image(jpg_extractions[i]), 1910, 1.29995, 0)
print(i)
print(file)
cropped_image.save("/home/andrew/Github/neuralink-bot/image_manipulation/cropped_jpgs/top_crop/top_crop_%s.jpg" % (str(i)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment