• 欢迎访问开心洋葱网站,在线教程,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站,欢迎加入开心洋葱 QQ群
  • 为方便开心洋葱网用户,开心洋葱官网已经开启复制功能!
  • 欢迎访问开心洋葱网站,手机也能访问哦~欢迎加入开心洋葱多维思维学习平台 QQ群
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏开心洋葱吧~~~~~~~~~~~~~!
  • 由于近期流量激增,小站的ECS没能经的起亲们的访问,本站依然没有盈利,如果各位看如果觉着文字不错,还请看官给小站打个赏~~~~~~~~~~~~~!

python Image.blend ValueError: images do not match

python 开心洋葱 1098次浏览 5个评论

python Image.blend ValueError: images do not match

from PIL import Image
 
 
def blend_two_images():
    img1 = Image.open( "bridge.png ")
    img1 = img1.convert('RGBA')
 
    img2 = Image.open( "birds.png ")
    img2 = img2.convert('RGBA')
    
    img = Image.blend(img1, img2, 0.3)
    img.show()
    img.save( "blend.png")
 
    return

提示错误:

Traceback (most recent call last):
File “F:/tmp/caizi.py”, line 192, in
pic_text(filepath,text,setFont,fillColor,filename,direction=None)
File “F:/tmp/caizi.py”, line 77, in pic_text
image = Image.blend(image, canvas,0.5)
File “D:\Python\Python37\lib\site-packages\PIL\Image.py”, line 2974, in blend
return im1._new(core.blend(im1.im, im2.im, alpha))
ValueError: images do not match

解决办法:

注意:本段内容须成功“回复本文”后“刷新本页”方可查看!


开心洋葱 , 版权所有丨如未注明 , 均为原创丨未经授权请勿修改 , 转载请注明python Image.blend ValueError: images do not match
喜欢 (4)

您必须 登录 才能发表评论!

(5)个小伙伴在吐槽
  1. 学习
    awk@live.com2024-01-11 11:10
  2. 11111
    2616152022-03-28 09:30
  3. 11111
    wxh2021-10-09 17:37
  4. ddf
    2123aa2021-09-23 18:51
  5. 是不是真的解决问题了?
    tst4py2021-01-21 16:01
加载中……