save img as png python code example
Example 1: python convert png to jpg
from PIL import Image
img = Image.open('image.png')
rgb_img = img.convert('RGB')
rgb_img.save('image.jpg')
Example 2: save image url to png python
import urllib.request
#python 3
urllib.request.urlretrieve(url, filename)