Python图片转为字节

作者: king2king | 来源:发表于2019-08-21 15:48 被阅读0次

Python图片转为字节

#图片URL
image_src = "https://static.geetest.com/nerualpic/word_l1_zh_2019.08.02/thota/6384bfb85ba10c02c69d02dda8ba535c.jpg?challenge=1ad1e140b00b3a62433610a1ff404e0f" 
image_src = image_src + 'png'
image = urllib.request.urlretrieve(image_src, filename='captcha.png')
im = open('captcha.png', 'rb').read()

相关文章

网友评论

    本文标题:Python图片转为字节

    本文链接:https://www.haomeiwen.com/subject/ufcisctx.html