2014-12-23 3 views

답변

3

(이 명령은 사진에 워터 마크를 추가), 난 당신이 dissolve operatorcomposite하려는 것입니다 가정합니다. 컴포지트를 적용하기 전에 Image.transparentize을 사용하여 워터 마크를 조정할 수 있습니다.

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') 

how to watermark a photo

힌트 : 큰 제어 & 효과에 대한 channel argument을 조정한다.