from PIL import Image
im=Image.open(‘lena.jpg’)
im.show()
img=im.convert(‘L’)
img.show()
im.thumbnail((64,64))
im.show()
im=Image.open(‘lena.jpg’)
box=(32,32,64,64)
region=im.crop(box)
region.show()
region=region.transpose(Image.ROTATE_180)
im.paste(region,box)
im.show()
out=im.resize((64,64))
out.show()
out1=im.rotate(45)
out1.show()