Rubblewebs

THESE CODES ARE PROVIDED FOR AN EXAMPLE OF HOW TO USE IMAGEMAGICK WITH PHP. CARE SHOULD BE TAKEN WHEN ACCEPTING USER INPUT.

I TAKE NO RESPONSABILTY FOR ANY PROBLEMS THAT MAY OCCURE WHEN USING ANY OF THIS CODE.

IT IS UP TO YOU TO SECURE THE CODE AND VALIDATE USER INPUT.

Imagemagick operators page 13

Opaque

Opaque using fill for the replacement colour and -fuzz to select a range.

Opaque example

$cmd = "$input -fuzz \"20%\" -fill orange -opaque red"; 
exec("convert $cmd opaque.jpg");

Ordered dither

Dither the image using a pre-defined ordered dither threshold map specified, and a uniform color map with the number of levels per color channel.

More information to follow.

Orient

Specify orientation of a digital camera image.

Orient example

$cmd = "$input -orient bottom-left"; 
exec("convert $cmd orient.jpg");
 

Page

Set the size and location of an image on the larger virtual canvas.

More information to follow.

Page

Set the size and location of an image on the larger virtual canvas.

More information to follow.

Paint

Oil paint effect.

Paint example

$cmd = "$input -paint 2"; 
exec("convert $cmd paint.jpg");

Path

Write images to this path on the disk.

More information to follow.

Pause

Pause between animation loops.

More information to follow.

Perceptible

set each pixel whose value is less than |epsilon| to -epsilon or epsilon (whichever is closer) otherwise the pixel value remains unchanged.

Another Perceptible example

Ping

Efficiently determine image characteristics.

40

$output = exec("identify -ping -format \"%[fx:h*0.2]\" $input"); 
echo $output;
 

( This can speed up the identify process. )

Pointsize

Set the font size to be used with draw, annotate etc.

Pointsize example

$cmd = "$input -font font/DRAGM.ttf -pointsize 55 ". 
"-fill white-gravity south -annotate 0,0 \"Draw text\" "; 
exec("convert $cmd pointsize.jpg");
 

Polaroid

Polaroid effect.

Polaroid example

$cmd = " -caption \"A  Hibiscus\" $input -background black -polaroid 5"; 
exec("convert $cmd polaroid.png");
 

( -polaroid = set the angle +polaroid = random angle between -15 and +15 degrees. - Background controls the shadow colour; save as png for transparent background. )

Poly

Combines multiple images according to a weighted sum of polynomials; one floating point weight (coefficient) and one floating point polynomial exponent (power) for each image expressed as comma separa

Another Poly example

Posterize

Reduce the image to a limited number of color levels.

Posterize example

$cmd = "$input -posterize 3"; 
exec("convert $cmd posterize.jpg");