我怎样才能在魔杖中作曲?

How can I do a compose in wand?

我正在尝试使用魔杖创建图像合成,但找不到正确的方法。

convert beijing_contrast.jpg  beijing_blurmap.jpg \
        -compose Blur -set option:compose:args 10 -composite \
        beijing_model.jpg

谁能帮我用 wand 做这个 ImageMagick 命令?

试试这个。

with Image(filename='beijing_contrast.jpg') as src:
    with Image(filename='beijing_blurmap.jpg') as dst:
        src.composite(dst, operator='blur', arguments='10')
    src.save(filename='beijing_model.jpg')

Image.composite() 方法在 Python 的 Wand 5.3 版中更新,包含 operator=arguments= 参数。