Imagemagick operators page: 15

Render

Render vector operations.

Repage

Adjust the canvas and offset information of the image.

Repage example
<?php 
$cmd 
"$input -crop 133x140+80+25 +repage"
exec("convert $cmd repage.jpg");
 
?>

( Use +repage to completely remove/reset the virtual canvas meta-data from the images. )

Resample

Resample image to specified horizontal and vertical resolution.

Resample example
<?php 
$cmd 
"$input -resample 30"
exec("convert $cmd resample.jpg");
 
?>

Resize

Resize the image and leave EXIF data etc.

See resize


( Resize and thumbnail have the same effect but thumbnail strips the EXIF data etc. but leaves the colour profile on later versions. You can specify the filter to use - see filter. )

Respect parenthases

Settings remain in effect until parenthesis boundary.

More information to follow.

Reverse

Reverse the order of images in the current image list.

Reverse example
<?php 
$cmd 
"$input1 $input -reverse -gravity center"
" -composite ";  
exec("convert $cmd reverse.jpg");
 
?>

Roll

Roll example
<?php 
$cmd 
"$input -roll +50+0"
exec("convert $cmd roll.jpg");
 
?>

Rotate

Rotate the image

Rotate example
<?php 
$cmd 
"$input -background transparent -rotate 30"
exec("convert $cmd rotate_30.png");
 
?>

Sample

Scale image using pixel sampling.

Sample example
<?php 
$cmd 
"$input -sample 100x100"
exec("convert $cmd sample.jpg");
 
?>

Scale

Different type of resizing an image

Scale example
<?php 
$cmd 
"$input -scale 133x100"
exec("convert $cmd scale.jpg");
 
?>

( The -scale option uses a simpler, faster algorithm than -resize, and it ignores the -filter setting if one is present. Offsets, if present in the geometry string, are ignored, and the -gravity option has no effect. )

Scene

Set scene number.

More information to follow.

<?php 
/*
convert '*.jpg' -resize 256 -scene 1 image_%02d.jpg 
*/
 
?>

( Resize all the jpg files in a folder and start saving them with the number 1 rather than the default of 0 )

Screen

Specify the screen to capture.

Not used with php

Seed

Seed a new sequence of pseudo-random numbers.

More information to follow.

Segment

Segment the colors of an image.

Segment example
<?php 
$cmd 
"$input -segment 60x0.5  ";
exec("convert $cmd segment.jpg");
 
?>