Convert images to webP using Pillow

前端 未结 1 1946
刺人心
刺人心 2020-12-17 16:50

I\'m trying to convert .jpg images to webp format using PIL.

I\'m using the this code:

from PIL import Image
import glob, os

for infile in glob.glob         


        
相关标签:
1条回答
  • 2020-12-17 17:39

    Make sure to install WEBP dev library for your OS. For Debian/Ubuntu it's libwebp-dev. You may need reinstall Pillow as well. In the output of Pillow install log you should see:

    --- WEBP support available
    
    0 讨论(0)
提交回复
热议问题