Imagemagick operators page: 20


soften the edges of the image in vignette style.

Vignette example
"$input -background none -vignette 0x6"
exec("convert $cmd vignette.png");

Virtual pixel

Specify contents of virtual pixels.

More information to follow.

"$input -matte -virtual-pixel NavajoWhite "
"-distort Perspective \"0,0 0,0  0,200 0,200 266,200 "
"266,180 266,0 266,20 \" "
exec("convert $cmd virtual_pixel.jpg");


Animate images using this X visual type.

Not used with php


Watermark an image using the given percentages of brightness and saturation.

Watermark example
"-watermark 100% -gravity center $input1 $input"
exec("composite $cmd watermark.jpg");


Shear the columns of an image into a sine wave.

Wave example
"$input -background Blue -wave 50x100"
exec("convert $cmd wave.jpg");


Set a font weight for text.

Weight example
"$input -fill black -pointsize 30 -weight Bold"
" -gravity center -annotate +2+2 \"Weight\""
exec("convert $cmd weight.jpg");

White point

Chromaticity white point.

White point example
// Probably need to use with other operators
$cmd "$input -white-point 0.4,0.4"
exec("convert $cmd white-point.jpg");

( The "x" and "y" have nothing to do with the x,y position of a pixel on the image. Instead, they are coordinates of the white pixel in the chromaticity diagram (see the color diagram on the right of the page at )

White threshold

Force to white all pixels above the threshold while leaving all pixels at or below the threshold unchanged.

White threshold example
"$input -white-threshold 50%";  
exec("convert $cmd white_threshold.jpg");


Make the image the background of a window.

Not used with php


Specify the window group.

Not used with php


Write an image sequence.

<?php // Resize an image four times and save each size
$cmd " input.jpg \( -clone 0 -thumbnail x480 -write 480_wide.jpg +delete \)"
" \( -clone 0 -thumbnail x250 -write 250_wide.jpg +delete \) "
" \( -clone 0 -thumbnail x100 -write 100_wide.jpg +delete \) -thumbnail 64x64! null: "
exec("convert $cmd 64_square.jpg ");  ?>