@@ -0,0 +1,480 @@
+#used to manipulate images before uploading%0A%0Adef crop(image, filename):%0A%09from wand.image import Image%0A%0A%09with Image(file=image) as img:%0A%09%09width = img.width%0A%09%09height = img.height%0A%0A%0A%09%09#if the width of an image is wider than 4096px, crop the width, but leave the height%0A%09%09if width %3E 4096:%0A%09%09%09print %22Image too wide, cropping width%22%0A%09%09%09img.crop(0, 0, 4096, height)%0A%09%09%09img.save(filename=filename)%0A%0A%09%09else:%0A%09%09%09print %22image is less than 4096px wide, saving%22%0A%09%09%09img.save(filename=filename)%0A

add image.py