Imagemagick operators page: 3

Border color

Set the border color.

Border color example
<?php 
$cmd 
"$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
<?php 
$cmd 
"$input -brightness-contrast 10";   
exec("convert $cmd brightness-contrast.jpg"); ?>

Cache

Depreciated see -limit

Caption

Assign a caption to an image.

Caption example
Another Caption example
<?php 
$cmd 
"-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. )

CDL

Color correct with a color decision list.

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

Channel

Work on the specified image channel

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

Charcol

Simulate a charcoal drawing.

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

Chop

Remove pixels from the interior of an image.

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

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

Clamp

Restrict image colors from 0 to the quantum depth.

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

Clip

Apply the clipping path if one is present.

Clip example
<?php 
$cmd 
"$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
<?php 
$cmd 
"$input6 -clip-path -colorspace Gray "
exec("convert $cmd clip_path.jpg");
  
?>

Clone

Make a copy of an image (or images).

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