実行します。
rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.3.8-Q16
rem 画像に半透明の濃淡をつける
%im%\convert.exe -seed 65535 -size 200x200 plasma:fractal -fx "luminosity" -matte -channel a -fx "r" -channel rgba sf.jpg -compose src_in -composite sample314a.png
rem 市松模様と重ね合わせ
%im%\convert.exe -size 200x200 pattern:checkerboard sample314a.png -composite sample314b.png
元画像(sf.jpg)
出力画像(sample314a.png)

重ね合わせ例(sample314b.png)

2008/07/13追記
ver6.4.0あたりからluminosityからlightnessに変わったので、以下のバッチを実行します。
rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.4.2-Q16
%im%\convert.exe -seed 65535 -size 200x200 plasma:fractal -fx "lightness" -matte -channel a -fx "r" -channel rgba sf.jpg -compose src_in -composite sample314a.png
%im%\convert.exe -size 200x200 pattern:checkerboard sample314a.png -composite sample314b.png
関連項目
ImageMagickで、任意の2色グラデーションのプラズマ・フラクタル画像を生成する
ImageMagickで、乱数のシード値を設定する
im4javaで画像に半透明の濃淡をつける (im4javaによる同様の処理)
No comments:
Post a Comment