how to convert this command to python using wand ?
composite -dissolve 30% -gravity south output-file.png input-file.jpg watermark.jpg
(this command adds a watermark to a photo)
how to convert this command to python using wand ?
composite -dissolve 30% -gravity south output-file.png input-file.jpg watermark.jpg
(this command adds a watermark to a photo)
Without seeing the expected result, I would assume you would want to composite with a dissolve operator. You can use Image.transparentize to adjust the watermark before applying the composite.
from wand.image import Image
from wand.compat import nested
images = (
'rose.png',
'wizard.png'
)
with nested(Image(filename=images[0]),
Image(filename=images[1])) as (rose, wizard):
rose.transparentize(0.33)
wizard.composite_channel("all_channels",
rose,
"dissolve",
wizard.width/2 - rose.width/2,
wizard.height - rose.height)
wizard.save(filename='out.png')
hint: Adjust the channel argument for greater control & effects.