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