ImageMagick の例 --
背景の例

ImageMagick の例:序文とインデックス
これは、さまざまな「ランダム」なキャンバスに対して、さまざまな変換を適用した表です。単一の大きな画像であろうと、Webページ用の背景タイルであろうと、必要なサイズで面白いランダムな背景を生成する方法を示しています。この表は、表示されている他のすべての画像の生成に使用される、最初の「ランダム」画像の生成に使用される方法から始まります。さまざまな画像「変換」をコマンドに挿入するだけで、生の画像を、表示されているものと同様のものに変換できます。そこから、さまざまな設定を自分で調整して、必要な背景画像を正確に生成できます。独自の例を作成する前に、最後にある注意事項を必ずお読みください。また、何か面白いバリエーションが見つかった場合は、メールでお知らせください。
入力画像:生成、変換、後処理  
ここに示されている画像の結果は、"-noop" のnull変換演算子を使用して生成されました
プラズマフラクタル(タイル化されていないキャンバス画像)

  magick -size 120x120  plasma:fractal fractal.png
  magick fractal.png   {..transform..} \
           -shave 20x20 +repage  -auto_level  {result}
 
[IM Output]
ランダムノイズ(タイル可能な背景画像)

  magick -size 80x80 xc: +noise Random noise.png
  magick noise.png -virtual-pixel tile  {..transform..} \
          -auto_level  {result}
 
[IM Output]
ランダムヘックスタイル(ヘックスタイルの背景画像)

  magick -size 50x80 xc: +noise Random -write mpr:rand \
           -extent 100x80   -page +50-40 mpr:rand \
           -page +50+40 mpr:rand -flatten  hextile.png
  magick hextile.png -virtual-pixel tile  {..transform..} \
          -auto_level    {result}
 
[IM Output]
 
基本変換
blur_raw (後処理 -自動レベルなし)
  -blur 0x1
[Fractal] [Noise] [Noise]
blur_1
  -blur 0x1
[Fractal] [Noise] [Noise]
blur_3
  -blur 0x3
[Fractal] [Noise] [Noise]
blur_5
  -blur 0x5
[Fractal] [Noise] [Noise]
blur_10
  -blur 0x10
[Fractal] [Noise] [Noise]
intensity
  -blur 0x10  -colorspace Gray
[Fractal] [Noise] [Noise]
channel
  -blur 0x10  -fx G
[Fractal] [Noise] [Noise]
hues
  -blur 0x10 -auto-level -separate -background white \
     -compose ModulusAdd -flatten -channel R -combine +channel \
     -set colorspace HSB -colorspace RGB
[Fractal] [Noise] [Noise]
陰影変換
shade_raw (後処理 -自動レベルなし)
  -shade 120x45
[Fractal] [Noise] [Noise]
shade
  -shade 120x45
[Fractal] [Noise] [Noise]
shade_dimmed (後処理 -自動レベルなし)
  -shade 120x45 -auto-level -fill grey -colorize 40%
[Fractal] [Noise] [Noise]
shade_1
  -blur 0x1 -shade 120x45
[Fractal] [Noise] [Noise]
shade_2
  -blur 0x2 -shade 120x45
[Fractal] [Noise] [Noise]
shade_5
  -blur 0x5 -shade 120x45
[Fractal] [Noise] [Noise]
shade_10
  -blur 0x10 -fx G -shade 120x45
[Fractal] [Noise] [Noise]
エンボス変換
emboss_1
  -blur 0x5  -emboss 1
[Fractal] [Noise] [Noise]
emboss_1g
  -blur 0x5  -emboss 1  -fx G
[Fractal] [Noise] [Noise]
emboss_0s
  -blur 0x3  -emboss .5 -shade 120x45
[Fractal] [Noise] [Noise]
emboss_1s
  -blur 0x5  -emboss 1  -shade 120x45
[Fractal] [Noise] [Noise]
emboss_1gs
  -blur 0x5  -emboss 1  -fx G  -shade 120x45
[Fractal] [Noise] [Noise]
emboss_5gs
  -blur 0x10 -emboss 5  -fx G  -shade 120x45
[Fractal] [Noise] [Noise]
エッジング変換
charcoal
  -blur 0x2  -charcoal 10 -negate
[Fractal] [Noise] [Noise]
charcoal_10s
  -blur 0x2  -charcoal 10 -negate -shade 120x45
[Fractal] [Noise] [Noise]
charcoal_1s
  -blur 0x2  -charcoal 1  -negate -shade 120x45
[Fractal] [Noise] [Noise]
edges
  -blur 0x2  -edge 10
[Fractal] [Noise] [Noise]
edge_grey
  -blur 0x2  -edge 10 -fx G
[Fractal] [Noise] [Noise]
mesas
  -blur 0x2  -edge 10 -fx G -shade 120x45
[Fractal] [Noise] [Noise]
線生成変換
lines
  -blur 0x10 -emboss 4 -edge 1
[Fractal] [Noise] [Noise]
loops
  -blur 0x10 -edge 15  -edge 1  -blur 0x1
[Fractal] [Noise] [Noise]
engrave_loops
  -blur 0x10 -edge 15  -edge 1  -blur 0x1 -fx R+B+G -shade 280x45
[Fractal] [Noise] [Noise]
engrave_loop
  -blur 0x10 -edge 15  -edge 1  -blur 0x1 -fx G -shade 280x45
[Fractal] [Noise] [Noise]
color_contours
  -blur 0x10 -normalize -fx 'sin(u*4*pi)*100' -edge 1 -blur 0x1
[Fractal] [Noise] [Noise]
contours
  -blur 0x10 -normalize -fx 'sin(g*4*pi)*100' \
     -edge 1 -blur 0x1 -shade 280x45
[Fractal] [Noise] [Noise]
複雑なテクスチャのブロブ変換
(奇妙な "-edge 1" 効果を使用)
blobs
  -blur 0x10 -edge 1
[Fractal] [Noise] [Noise]
blobs_grey
  -blur 0x10 -edge 1 -fx '(R+G+B)/3'
[Fractal] [Noise] [Noise]
pits
  -blur 0x10 -edge 1 -fx G -shade 280x45
[Fractal] [Noise] [Noise]
ridges
  -blur 0x10 \( +clone -negate \) -edge 1 -fx u.G+v.G -shade 280x45
[Fractal] [Noise] [Noise]
mottled
  -blur 0x10 -write mpr:save -negate -edge 1 -negate -fx G \
     \( mpr:save -edge 1 -fx G \) -shade 280x45 -evaluate-sequence mean
[Fractal] [Noise] [Noise]
ペイント変換
paint_raw10 (後処理 -自動レベルなし)
  -paint 10
[Fractal] [Noise] [Noise]
paint_areas
  -paint 10  -blur 0x5  -paint 10
[Fractal] [Noise] [Noise]
paint_raw10s
  -paint 10  -shade 120x45
[Fractal] [Noise] [Noise]
paint_8
  -blur 0x5  -paint 8
[Fractal] [Noise] [Noise]
paint_8s
  -blur 0x5  -paint 8  -shade 120x45
[Fractal] [Noise] [Noise]
paint_3
  -blur 0x10 -paint 3
[Fractal] [Noise] [Noise]
paint_3s
  -blur 0x10 -paint 3  -shade 120x45
[Fractal] [Noise] [Noise]
paint_3d
  -blur 0x10 -paint 3 \( +clone -shade 120x45 \) \
     +swap  -compose overlay -composite
[Fractal] [Noise] [Noise]
グラデーション変換
levels (後処理 -自動レベルなし)
  -blur 0x12 -fx intensity -normalize \
     -size 1x9 gradient:navy-lavender \
     -interpolate integer -fx 'v.p{0,G*(v.h-1)}'
[Fractal] [Noise] [Noise]
levels_3d (後処理 -自動レベルなし)
  -blur 0x12 -fx intensity -normalize \
     -size 1x9 gradient:navy-lavender \
     -interpolate integer -fx 'v.p{0,G*(v.h-1)}' \
     \( +clone -shade 120x45 -normalize \) \
     -compose overlay -composite
[Fractal] [Noise] [Noise]
zebra
  -blur 0x12 -normalize \
     -size 1x19   pattern:gray50   -fx 'v.p{0,G*(v.h-1)}'
[Fractal] [Noise] [Noise]
midlevel
  -blur 0x12 -normalize \
     \( -size 1x9 xc: -draw 'color 0,4 point' -negate \) \
     -fx 'v.p{0,G*(v.h-1)}'
[Fractal] [Noise] [Noise]
edged_level (後処理 -自動レベルなし)
  -blur 0x12 -normalize \
     \( -size 1x9 xc: -draw 'color 0,4 point' \) \
     -fx '(.6+.2*v.p{0,G*(v.h-1)})' \
     \( +clone -normalize -edge 1 \)  -fx 'u+v'
[Fractal] [Noise] [Noise]
layered_levels (後処理 -自動レベルなし)
  -blur 0x12 -normalize \
     \( -size 1x9 xc: -draw 'color 0,4 point' \) \
     -fx '(.5+.3*v.p{0,u*(v.h-1)})' \
     \( +clone -normalize -edge .3 -fx 'R+G+B' \) \
     -fx 'intensity+v'  -fill skyblue -tint 100
[Fractal] [Noise] [Noise]
その他
filaments
  -blur 0x5 -normalize -fx g \
     -sigmoidal-contrast 15x50% -solarize 50%
[Fractal] [Noise] [Noise]

もしあなたが良い背景ジェネレータや画像変換を思いついたり、見つけたりしたら、ぜひ教えてください。ここに他の人と共有するために追加できます。

最後に重要な注意事項

2つのランダムノイズ画像は非常に「ランダム」であるためタイル化可能であり、変換中もタイル化可能であることを保証するために、"-virtual-pixels"を使用します。ただし、プラズマ画像は最初からタイル化可能ではないため、多くの操作による不要なエッジ効果を削除するために、エッジを "-shave" で削除した拡大バージョンが使用されます。このテクニックについては、タイル画像の変更で詳しく説明します。最後の"-auto_level"は、変換の結果として得られた色や陰影を保持するために、変換に不要とマークされていない限り、ほとんどの画像に適用され、結果のコントラストを高めます。"-blur"、"-emboss"、"-edge"などの多くの画像変換はグレースケール変換であるため、3つのカラーチャネルで互いに完全に独立して動作します。その結果、多くの画像では、3つの別々の画像がオーバーレイされ、陰影付けされているように見えます。最後の例である "layered_levels" は、3つのレベルそれぞれで同時に動作するように設計されており、最終ステップでそれらを一緒に加算して色を付けるまで、それらを分離したままにします。この三重の効果は、最初にグレースケール操作を適用するか、終了時にいずれかのチャネルを抽出することで削除できます。通常、グレースケール画像で最も強いチャネルであるため、 'green' または 'G' チャネルを抽出しますが、3つのチャネルのいずれも使用できます。