I'm trying to convert a large amount of photos into the webp format. The lines of code I'm using are as simple as :
from PIL import Image
im = Image.open('./images/image_1.jpg')
im = im.convert('RGB')
im.save('./webps/image_1.webp', 'webp')
Unfortunately, I get the following error because of the last line :
C:\Anaconda\...\lib\site-packages\PIL\WebPImagePlugin.py in _save(im, fp, filename)
335 method,
336 exif,
--> 337 xmp,
338 )
339 if data is None:
TypeError: function takes exactly 9 arguments (10 given)
I have no idea on how to solve this error as it doen't make any sense to me.