from PIL import Image
from resizeimage import resizeimage
with open(’/home/ccpem_project/MRC2tif_2/Falcon_2015_05_14-20_42_18.tif’, ‘r+b’) as f:
with Image.open(f) as image:
cover = resizeimage.resize_cover(image, [256, 256])
cover.save(‘tnew5.tif’, image.format)
I used this to resize the image. But if I use the original Falcon_2015_05_14-20_42_18.tif image, it works fine!