pillow image.save code example
Example 1: pil save image
from PIL import Image
newImg1 = Image.new('RGB', (512,512))
newImg1.save("img1.png")
Example 2: pil resize image
im = Image.open('image.jpg')
im = im.resize((w, h))
from PIL import Image
newImg1 = Image.new('RGB', (512,512))
newImg1.save("img1.png")
im = Image.open('image.jpg')
im = im.resize((w, h))