Image.save() method python code example
Example 1: pil get image size
from PIL import Image
im = Image.open('whatever.png')
width, height = im.size
Example 2: pillow image from array
PIL.Image.fromarray(your_array)
from PIL import Image
im = Image.open('whatever.png')
width, height = im.size
PIL.Image.fromarray(your_array)