I have an image file in avif format How can I convert this file to png format?
I found some code to convert jpg files to avif, but I didn't find any code to reconvert them.
CodePudding user response:
You need to install this modules: pip install pillow-avif-plugin Pillow
Then:
from PIL import Image
import pillow_avif
img = Image.open('input.avif')
img.save('output.png')