好了,在查看了ImageMagick的Composite源代码本身之后,很明显,Wand驱动的解决方案应如下所示:
with Image(width=x, height=y) as img:
for x in xrange(0, img.width, crop_mask_path.width):
for y in xrange(0, img.height, crop_mask_path.height):
img.composite_channel('default_channels', crop_mask_path, 'over', x, y)
img.save(filename='patterned_image.png')
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句