This tutorial covers some some functions using PHP with Image Magick from the command line. I called it Illustrate because FX (as the button at IM states) is another function altogether, not included here. |
Arc angle = 0-360 <? $IN="SGdoor.jpg"; $ILLUSTRATE="-virtual-pixel white -distort arc 180"; $OUT="SGdoorDArc.jpg"; exec ("/usr/bin/convert $IN $ILLUSTRATE $OUT"); ?> | ||
ORIGINAL |
DISTORT ARC | |
4 sets of coordinates each set = Orig ~~> Distort <? $IN="SGdoor.jpg"; $ILLUSTRATE="-distort Perspective '0,0,0,0 0,150,0,150 150,0,150,30 150,150,150,120' "; $OUT="SGdoorDt.jpg"; exec ("/usr/bin/convert $IN $ILLUSTRATE $OUT"); ?> | ||
ORIGINAL |
DISTORT PERSPECTIVE | |
<? $IN="SGdoor.jpg"; $ILLUSTRATE="-distort Bilinear '0,0,0,0 0,150,0,150 150,0,150,30 150,150,150,120' "; $OUT="SGdoorBiL.jpg"; exec ("/usr/bin/convert $IN $ILLUSTRATE $OUT"); ?> | ||
ORIGINAL |
DISTORT BILINEAR | |
Morph 2 images same size -morph 4=# of frames Must be made a gif, 110 kb <? $ILLUSTRATE="convert lion.jpg \( +clone -set delay 40 fish.gif -morph 4 -delete 0 \)\( +clone -set delay 40 fish.gif -morph 4 -delete 0 \) \( +clone -set delay 40 lion.jpg -morph 4 -delete 0 \) -layers Optimize $OUT"; $OUT="SGmorph.gif"; exec ("/usr/bin/convert $ILLUSTRATE $OUT"); ?> |
ORIGINAL |
MORPH |
<? $ILLUSTRATE="-layers Optimize"; $OUT="AniHead.gif"; exec ("/usr/bin/convert \( -delay 60 -morph 1 SGLlion.png -morph 1 SGMlion.png SGRlion.png SGMlion.png \) $ILLUSTRATE $OUT"); ?> | MORPH 1 FRAME | |
IMAGES USED | ||
<? $ILLUSTRATE="-size 100x100 xc: +noise Random -separate null: \( xc: +noise Random -separate -threshold 30% -negate \) -compose CopyOpacity -layers composite -set dispose background Optimize -set delay 20 -loop 0"; $OUT="glitter_overlay.gif"; exec ("/usr/bin/convert $ILLUSTRATE $OUT"); ?> |
XC MADE |
MORPH GLITTER |
<? $IN="Examples/glitter_overlay.gif"; $ILLUSTRATE="-compose Screen -bordercolor GoldenRod -border 0x0"; $OUT="glitter_gold.gif"; exec ("/usr/bin/convert $IN $ILLUSTRATE $OUT"); ?> | ORIGINAL |
GLITTER GOLD |
<? $IN="Examples/glitter_overlay.gif"; $ILLUSTRATE="-compose Screen -bordercolor fuschia -border 0x0"; $OUT="glitter_gold.gif"; exec ("/usr/bin/convert $IN $ILLUSTRATE $OUT"); ?> | ORIGINAL |
GLITTER FUSCHIA |
<? $IN1="SGwindow.jpeg"; $IN2="SGstar.jpg"; $ILLUSTRATE="-page +0+0 $IN1 -page +68+0 $IN2 -page +198+0 $IN1 -background black -mosaic"; $OUT="SGwinMos.jpg"; exec ("/usr/bin/convert $ILLUSTRATE $OUT"); ?> | MOSAIC | |
PAGE 1 |