Skip to content

Commit 23ec471

Browse files
author
Cristy
committed
...
1 parent dacd14c commit 23ec471

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

docs/command-line-processing/index.html

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,23 @@
4848
-draw 'roundrectangle 16, 5, 304, 85 20,40' \( +clone -background snow4 \
4949
-shadow 80x3+3+3 \) +swap -background none -layers merge \( +size -pointsize 90 \
5050
-strokewidth 1 -fill red label:'50 %' -trim +repage \( +clone -background firebrick3 \
51-
-shadow 80x3+3+3 \) +swap -background none -layers merge \) -insert 0 -gravity center \
52-
-append -background white -gravity center -extent 320x200 cylinder_shaded.png</samp></pre>
51+
-shadow 80x3+3+3 \) +swap -background none -layers merge \) -insert 0 \
52+
-gravity center -append -background white -gravity center -extent 320x200 \
53+
cylinder_shaded.png</samp></pre>
5354

5455
<p>Run this script contributed by <a href="https://github.com/geemack">Geemack</a>. You'll get a glimpse of the power and versatility of the ImageMagick command-line:</p>
5556
<pre class="overflow-auto p-3 mb-2 text-body-secondary bg-body-tertiary cli"><samp>$ magick -background none -size 960x960 xc:black \( xc:darkred -duplicate 1 +append \) \
5657
xc:gold \( xc:teal -duplicate 2 +append \) -modulate 100,100,"%[fx:rand()*200]" \
5758
xc:white -scale x1 +append -write mpr:clut +delete radial-gradient: mpr:clut \
58-
-clut -scale 100x4% -wave "%[fx:rand()*24+24]"x"%[fx:w/ceil(rand()*4+1)]" -extent "%[w]x%[w]" \
59-
-roll +0+"%[fx:(rand()*w*0.05)+(w*0.51)]" \( +clone -blur 0x4 \) -insert 0 -composite \
60-
-duplicate "%[fx:floor(rand()*3+3)*2-1]" -set option:rot "%[fx:180/n]" -virtual-pixel tile \
61-
-virtual-pixel none -distort SRT "%[fx:t*360/n]" +repage -flatten -extent 100x50% \
62-
\( +clone -rotate 180 \) -append +channel -virtual-pixel none -distort SRT "0.96 %[fx:rand()*360]" \
63-
\( +clone -flop \) +repage -insert "%[fx:round(rand())]" -background black \
64-
-flatten -brightness-contrast 20,20 -normalize dragonFire.png</samp></pre>
59+
-clut -scale 100x4% -wave "%[fx:rand()*24+24]"x"%[fx:w/ceil(rand()*4+1)]" \
60+
-extent "%[w]x%[w]" -roll +0+"%[fx:(rand()*w*0.05)+(w*0.51)]" \( +clone \
61+
-blur 0x4 \) -insert 0 -composite -duplicate "%[fx:floor(rand()*3+3)*2-1]" \
62+
-set option:rot "%[fx:180/n]" -virtual-pixel tile -virtual-pixel none \
63+
-distort SRT "%[fx:t*360/n]" +repage -flatten -extent 100x50% \
64+
\( +clone -rotate 180 \) -append +channel -virtual-pixel none \
65+
-distort SRT "0.96 %[fx:rand()*360]" \( +clone -flop \) +repage \
66+
-insert "%[fx:round(rand())]" -background black -flatten \
67+
-brightness-contrast 20,20 -normalize dragonFire.png</samp></pre>
6568
<p>To ensure the script can run under Windows, change any backslash-parens (\() to just parens, the backslash (\) to <code>^</code>, and double-up the percent (%) signs.</p>
6669
<p>In the next sections we dissect the anatomy of the ImageMagick command-line. Hopefully, after carefully reading and better understanding how the command-line works, you should be able to accomplish complex image-processing tasks without resorting to the sometimes daunting <a href="/develop/">program interfaces</a>.</p>
6770

0 commit comments

Comments
 (0)