Imagemagick operators page: 16

Selective blur

Selectively blur pixels within a contrast threshold.

Selective blur example
<?php $cmd $input -selective-blur 0x6+09% ";
exec("convert $cmd selective_blur.jpg"); ?>


Separate an image channel into a grayscale image.

Separate example
$input -channel RGB -separate "
exec ("convert $cmd separate.png");

( Specify the channel with -channel. )

Sepia tone

Sepia effect.

Sepia tone example
"$input -sepia-tone \"80%\" "
exec("convert $cmd sepia-tone.jpg");


Set an image attribute for all images in the current image sequence, after they have been created or read in.

More information to follow.


Shade the image using a distant light source.

Shade example
// Create the text
$cmd "-size 215x68 xc:none -pointsize 25 -fill white ".
" -gravity northwest -annotate +15+10 Boots ".
" -gravity southeast -annotate +10+0 Boots -shade 240x40";
exec("convert $cmd tmp_font.png ");

// Create the gradiant
exec("convert -size 213x160 gradient:pink-red tmp_gradient.png");

// Put the text over the gradiant
exec("composite -watermark 40% -tile tmp_font.png tmp_gradient.png watermark.png"); 

// Put the image over the watermarked gradiant
exec("convert watermark.png $input1 -gravity center -composite shade.jpg");


Simulate an image shadow.

Shadow example
"$input ( +clone -background black -shadow 80x4+5+5 )"
" +swap -background none -layers merge +repage "
exec("convert $cmd shadow.png");

( To retain the transparency of the shadow save as a png. )

Shared memory

Use shared memory.


sharpen the image.

Sharpen example
"$input -sharpen 5";  
exec("convert $cmd sharpen.jpg");


Shave pixels from the image edges.

Shave example
"$input -shave 40x20"
exec("convert $cmd shave.jpg");


Shear the image along the x-axis and/or y-axis.

Shear example
"$input -background NavajoWhite -shear 15x15"
exec("convert $cmd shear.jpg");

( The colour of the parts of the canvas exposed by the image moving are set by -background. )

Sigmoidal contrast

Increase the contrast without saturating highlights or shadows.

Sigmoidal contrast example
"$input -sigmoidal-contrast \"3x20%\" "
exec("convert $cmd sigmoidal_contrast.jpg");


Operate silently.

More information to follow.

Similarity threshold

Minimum RMSE for subimage match.

( Used with compare )


Set the width and height of the image.

Size example
"-size 213x160 xc:NavajoWhite -stroke black ".   
"-strokewidth 1 -fill none -draw \"circle 106,80 106,10 \" ";   
exec("convert $cmd size.jpg");