Replace a color using Wand

我的梦境 提交于 2019-12-06 14:49:00

I would guess that you did not apply the drawing context to the image.

from wand.image import Image
from wand.display import display
from wand.drawing import Drawing
from wand.color import Color

with Drawing() as draw:
    draw.fill_color = Color('#ff0000')
    draw.color(192,84,'replace')

    with Image(filename='gb.jpg') as img:
        draw(img)  # <= here
        img.save(filename='rgr.jpg')
        display(omg)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!