rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.8-Q16
%im%\convert.exe sf2.jpg -matte -channel rgba ( -size 300x225 xc:none -strokewidth 0 -stroke white -fill white -draw "roundrectangle 10,10 289,214 30,30" ) -compose dst_in -composite ( sf2.jpg -modulate 150 ) +swap -compose src-over -composite -matte ( -size 300x225 xc:none -strokewidth 10 -draw "roundrectangle 10,10 289,214 30,30" ) -compose dst_in -composite sample319a.png
rem 重ねあわせ例
%im%\convert.exe -size 300x225 xc:#353030 sample319a.png -composite sample319b.jpg
元画像(sf2.jpg)

出力画像(sample319a.png):黒色部分は透過します。

重ね合わせ例(sample319b.jpg)

関連項目
ImageMagickで画像を角丸四角に切り取って文字入れをする
ImageMagickとPHPで縁を明るくして角丸四角に切り取る
No comments:
Post a Comment