今天做爬虫时,发现爬下来的图片是webp,直接上传到oss,发现不能正常打开。
于是,在网上搜如何将webp转png,jpg等正常图片格式,最终搜到这篇,试了一下可行:
https://blog.csdn.net/wgPython/article/details/80740067 这篇作者的解决方案又源于stackoverflow: https://stackoverflow.com/questions/33101935/convert-pil-image-to-byte-array
今天做爬虫时,发现爬下来的图片是webp,直接上传到oss,发现不能正常打开。
于是,在网上搜如何将webp转png,jpg等正常图片格式,最终搜到这篇,试了一下可行:
https://blog.csdn.net/wgPython/article/details/80740067 这篇作者的解决方案又源于stackoverflow: https://stackoverflow.com/questions/33101935/convert-pil-image-to-byte-array