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 9

Fx

The Fx special effects image operator is used to apply a mathematical expression to an image or image channels.

Fx example

$cmd = "$input -fx \"(1.0/(1.0+exp(10.0*(0.5-u)))-0.006693)*1.0092503\" "; 
exec("convert $cmd fx.jpg");

Gamma

Level of gamma correction.

Gamma example

$cmd = "$input -gamma 0.8 "; 
exec("convert $cmd gamma.jpg");

Gaussian blur

Blur the image with a Gaussian operator.

Gaussian blur example

$cmd = "$input -gaussian-blur 0x4 "; 
exec("convert $cmd gaussian-blur.jpg");

Geometry

Geometry sets the coordinates for the modification.

Geometry example

$cmd = "$input -fill white -pointsize 40".
" -gravity center -geometry +30+30 -annotate +0+0 \"Geometry\" "; 
exec("convert $cmd geometry.jpg");

( If -gravity is used as well it is in relation to the gravity position otherwise it is from the top left corner. )

Gravity

Gravity sets the location of the modification.

Gravity example

$cmd = "$input -gravity north -annotate +0+0 \"North\" "; 
exec("convert $cmd gravity.jpg");

( Points of the compass are used e.g. North, North west, West etc. )

Grayscale

Convert image to grayscale.

Grayscale example

 
$cmd = "$input -grayscale Rec709Luminance ";   
exec("convert $cmd grayscale.jpg");

Green primary

Green chromaticity primary point.

More information to follow.


( For each color, x+y must be positive and less than 1.0. If you specify one you should specify all six plus the white_point x and y. )

Hald clut

Apply a Hald color lookup table to the image.

Hald clut example

$cmd = "$input $input5 -hald-clut";
exec("convert $cmd hald_clut.jpg");

Help

Display the help file

-adjoin join images into a single multi-image file
-affine matrix affine transform matrix


( A couple of lines from the help file )

Highlight color

When comparing images, emphasize pixel differences with this color.

More information to follow.

Icon Geometry

Specify the icon geometry.

More information to follow.

Iconic

Iconic animation

More information to follow.

Identify

Identify the format and characteristics of the image.

input.jpg=>-identify JPEG
266x200 266x200+0+0 8-bit DirectClass 16kb

system("convert $input -identify ");
 

( More information can be desplayed by adding -verbose )

IFT

Implements the inverse discrete Fourier transform (DFT).

More information to follow.