# coding=UTF-8
import win32com.client
im = win32com.client.Dispatch("ImageMagickObject.MagickImage.1")
im.convert("-size", "120x120", "xc:none", "-fill", "#C0C0C050",
"-stroke", "#E0E0E050", "-draw",
"roundrectangle 0,0, 119,119,10,10", "(", "sf.jpg", "-resize",
"100x100", "+repage", ")", "-geometry", "+10+10", "-composite",
"sample1403a.png")
#重ねあわせ例
im.convert("sf2.jpg", "(", "sample1403a.png", "-virtual-pixel",
"background", "-background", "none", "-rotate", "-10", ")",
"-geometry", "+150+100", "-composite", "sample1403b.png")
元画像1(sf.jpg)
元画像2(sf2.jpg)
出力画像1(sample1403a.png)
出力画像2(sample1403b.png)
動作環境
Python3.1.1, Python for Windows Extensions (Build 214), ImageMagick6.5.5
No comments:
Post a Comment