rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.7-Q16
rem 任意の矩形以外を暗くする
%im%\convert.exe -size 300x225 xc:none -fill white -draw "rectangle 10,10,204,214" sf2.jpg -compose src_in -composite ( sf2.jpg -modulate 30 ) +swap -composite sample283a.png
元画像(sf2.jpg)

出力画像(sample283a.png)

任意の角丸四角以外の領域を暗くするには、以下のバッチファイルを実行します。
rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.7-Q16
rem 任意の角丸四角以外を暗くする
%im%\convert.exe -size 300x225 xc:none -fill white -draw "roundrectangle 10,10,204,214,20,20" sf2.jpg -compose src_in -composite ( sf2.jpg -modulate 30 ) +swap -composite sample283b.png
出力画像(sample283b.png)

任意の円の領域以外を暗くするには、以下のバッチファイルを実行します。
rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.7-Q16
rem 任意の円以外を暗くする
%im%\convert.exe -size 300x225 xc:none -fill white -draw "ellipse 130,110,100,100,0,360" sf2.jpg -compose src_in -composite ( sf2.jpg -modulate 30 ) +swap -composite sample283c.png
出力画像(sample283c.png)

No comments:
Post a Comment