Pythonista-Issues
Pythonista-Issues copied to clipboard
PIL resize large image crash
trafficstars
System Information
- Pythonista 3.2 (320000), Default interpreter 3.6.1
- iOS 12.1, model iPad7,1, resolution (portrait) 2048.0 x 2732.0 @ 2.0 ——————————————
Hello,
If I try to resize an image (PNG, TIFF, PSD) larger than 5000px the script will quit.
Here’s some code: Try sharing a PNG (JPEG’s can go larger) around 5000x3000px
Thanks.
——— Example code ————
import appex from PIL import Image
img = appex.get_image()
resized_image = img.resize((1200, 1200), Image.ANTIALIAS)
resized_image.save('test.png')
print('Done')