2
我想混合两个图像在一起,但我不断收到错误,其中一个图像在错误的模式。我试图转换这个图像,但我试过的每个模式只是使整个图像变白。 Python中有没有使用PIL模块来找出当前图像模式的方法?获取图像模式PIL Python
Image.blend(img ,im ,0.05)
错误消息: ValueError: image has wrong mode
我想混合两个图像在一起,但我不断收到错误,其中一个图像在错误的模式。我试图转换这个图像,但我试过的每个模式只是使整个图像变白。 Python中有没有使用PIL模块来找出当前图像模式的方法?获取图像模式PIL Python
Image.blend(img ,im ,0.05)
错误消息: ValueError: image has wrong mode
查看的文档中的Image Attributes:
im.mode
⇒string
Image mode. This is a string specifying the pixel format used by the image. Typical values are
'1'
,'L'
,'RGB'
, or'CMYK.'
See Concepts for a full list.
的Image.convert
方法创建,从现有的图像,新Image
与给定mode
。
什么是完整的错误? –
return im1._new(core.blend(im1.im,im2.im,alpha)) ValueError:image有错误的mod – Chidwack