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

Separate an image channel into a grayscale image.

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

( Specify the channel with -channel. )

Sepia tone

Sepia effect.

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

Set

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

Shade the image using a distant light source.

Shade example
<?php 
// 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");
 
?>

Shadow

Simulate an image shadow.

Shadow example
<?php 
$cmd 
"$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

sharpen the image.

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

Shave

Shave pixels from the image edges.

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

Shear

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

Shear example
<?php 
$cmd 
"$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
<?php 
$cmd 
"$input -sigmoidal-contrast \"3x20%\" "
exec("convert $cmd sigmoidal_contrast.jpg");
 
?>

Silent

Operate silently.

More information to follow.

Similarity threshold

Minimum RMSE for subimage match.


( Used with compare )

Size

Set the width and height of the image.

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