Imagemagick operators page: 3

Border color

Set the border color.

Border color example
"$input -bordercolor Orange -border 10x5"
exec("convert $cmd bordercolor.jpg");

Border width

The width of the border.

Depreciated use -border

Brightness contrast

Adjust the brightness and/or contrast of the image

Brightness contrast example
"$input -brightness-contrast 10";   
exec("convert $cmd brightness-contrast.jpg"); ?>


Depreciated see -limit


Assign a caption to an image.

Caption example
Another Caption example
"-size 213x160 -background NavajoWhite "
"-fill black -gravity center caption:\"Caption\" "
exec("convert $cmd caption.jpg");

$size getimagesize$input ); 
$cmd $input ( -size {$size[0]}x30"
" -background black -fill white"
" -pointsize 16 -gravity center"
" caption:\"Caption\" -flatten ) -append "
exec("convert $cmd caption_size.jpg");

( The font size is automaticaly sellected to fit the width. )


Color correct with a color decision list.

CDL example
"$input -cdl images/cdl.xml ";  
exec("convert $cmd cdl.jpg");


Work on the specified image channel

Channel example
"$input -channel RB -fx 0 "
exec("convert $cmd channel.jpg");

( Specify those image color channels to which subsequent operators are limited. In this case setting red and blue channels to zero )


Simulate a charcoal drawing.

Charcol example
"$input -charcoal 1";
exec("convert $cmd charcoal.jpg");


Remove pixels from the interior of an image.

Chop example
"$input -gravity center -chop 20x20 "
exec("convert $cmd chop.jpg");

( The image size is reduced by the amount of pixels removed from the image. )


Restrict image colors from 0 to the quantum depth.

Clamp example
"$input -clamp -colors 50 "
exec("convert $cmd clamp.jpg");


Apply the clipping path if one is present.

Clip example
"$input6 -clip-path -negate "
exec("convert $cmd clip.jpg");

Clip mask

Clip the image as defined by this mask.

More information to follow.

Clip path

Clip along a named path from the 8BImageMagick profile.

Clip path example
"$input6 -clip-path -colorspace Gray "
exec("convert $cmd clip_path.jpg");


Make a copy of an image (or images).

Clone example
"$input ( +clone -thumbnail x480 -write 480_wide.jpg"
" +delete ) -thumbnail \"100x100!\" "
exec("convert $cmd clone.jpg");