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.

Links to pages showing how to use all the functions



There are 330 functions listed here


A
Adaptive blur image - Adds an adaptive blur filter to image.
Adaptive resize image - Adaptively resize image with data-dependent triangulation.
Adaptive threshold image - Selects an individual threshold for each pixel based on the range of intensity values in its local neighborhood.
Adaptively sharpen image - Adaptively sharpen the image by sharpening more intensely near image edges and less intensely far from edges.
Add image - Adds new image to Imagick object from the current position of the source object.
Add noise image - Adds random noise to the image.
Affine transform image - Transforms an image as dictated by the affine matrix.
Animate images - This method animates the image onto a local or remote X server.
Annotate image - Annotates an image with text.
Append images - Append a set of images into one larger image.
Average images - Average a set of images.

B
Black threshold image - Forces all pixels below the threshold into black while leaving all pixels above the threshold unchanged.
Blur image - Adds blur filter to image.
Border image - Surrounds the image with a border of the color defined by the bordercolor ImagickPixel object.

C
Charcoal image - Simulates a charcoal drawing.
Chop image - Removes a region of an image and collapses the image to occupy the removed portion.
Clear - Clears all resources associated to Imagick object
Clip image - Clips along the first path from the 8BIM profile, if present.
Clip path image - Clips along the named paths from the 8BIM profile, if present.
Clone - Makes an exact copy of the Imagick object.
Clut image - Replaces colors in the image from a color lookup table.
Coalesce images - Composites a set of images while respecting any page offsets and disposal methods.
Color floodfill image - Changes the color value of any pixel that matches target and is an immediate neighbor.
Colorize image - Blends the fill color with each pixel in the image.
Combine images - Combines one or more images into a single image.
Comment image - Adds a comment to your image.
Compare Image channels - Compares one or more images and returns the difference image.
Compare image layers - Compares each image with the next in a sequence and returns the maximum bounding region of any pixel differences it discovers.
Compare images - Returns an array containing a reconstructed image and the difference between images.
Composite image - Composite one image onto another at the specified offset.
Construct - Creates an Imagick instance for a specified image or set of images.
Contrast image - Enhances the intensity differences between the lighter and darker elements of the image.
Contrast stretch image - Enhances the contrast of a color image by adjusting the pixels color to span the entire range of colors available.
Convolve image - Applies a custom convolution kernel to the image.
Crop image - Extracts a region of the image.
Crop thumbnail image - Creates a fixed size thumbnail by first scaling the image up or down and cropping a specified area from the center.
Current - Returns reference to the current imagick object with image pointer at the correct sequence.
Cycle colormap image - Displaces an image's colormap by a given number of positions.

D
Decipher image - Deciphers image that has been enciphered before.
Deconstruct images - Compares each image with the next in a sequence and returns the maximum bounding region of any pixel differences it discovers.
Delete image artifact - Deletes an artifact associated with the image.
Deskew image - This method can be used to remove skew from for example scanned images where the paper was not properly placed on the scanning surface.
Despeckle image - Reduces the speckle noise in an image while preserving the edges of the original image
Destroy - Destroys the Imagick object and frees all resources associated with it.
Display image - This method displays an image on a X server.
Display images - Displays an image or image sequence on a X server.
Distort image - Distorts an image using various distortion methods.
Draw image - Renders the ImagickDraw object on the current image.

E
Edge image - Enhance edges within the image with a convolution filter of the given radius.
Emboss image - Returns a grayscale image with a three-dimensional effect.
Encipher image - Converts plain pixels to enciphered pixels.
Enhance image - Applies a digital filter that improves the quality of a noisy image.
Equalize image - Equalizes the image histogram.
Evaluate image - Applys an arithmetic, relational, or logical expression to an image.
Export image pixels - Exports image pixels into an array
Extent image - Comfortability method for setting image size.

F
Flatten images - Merges a sequence of images.
Flip image - Creates a vertical mirror image by reflecting the pixels around the central x-axis.
Flood fill paint - Changes the color value of any pixel that matches target and is an immediate neighbor.
Flop image - Creates a horizontal mirror image by reflecting the pixels around the central y-axis.
Frame image - Adds a simulated three-dimensional border around the image.
Function image - Applies an arithmetic, relational, or logical expression to an image.

f
fx image - Evaluate expression for each pixel in the image.

G
Gamma image - Gamma-corrects an image.
Gaussian blur image - Blurs an image.
Get color as string - Returns the color of the ImagickPixel object as a string.
Get color count - Returns the color count associated with this color.
Get color value - Retrieves the value of the color channel specified, as a floating-point number between 0 and 1.
Get colorspace - Gets the global colorspace value.
Get compression - Gets the object compression type.
Get compression quality - Gets the object compression quality.
Get copyright - Returns the ImageMagick API copyright as a string.
Get filename - Returns the filename associated with an image sequence.
Get font - Returns the objects font property.
Get format - Returns the format of the Imagick object.
Get gravity - Gets the global gravity property for the Imagick object.
Get home URL - Returns the ImageMagick home URL.
Get HSL - Returns the normalized HSL color described by the ImagickPixel object, with each of the three values as floating point numbers between 0.0 and 1.0.
Get image - Returns a new Imagick object with the current image sequence.
Get image alpha channel - Gets the image alpha channel value.
Get image artifact - Gets an artifact associated with the image.
Get image background color - Returns the image background color.
Get image blob - Implements direct to memory image formats.
Get image blue primary - Returns the chromaticity blue primary point for the image.
Get image border color - Returns the image border color.
Get image channel depth - Gets the depth for a particular image channel.
Get image channel distortion - Compares one or more image channels of an image to a reconstructed image and returns the specified distortion metric.
Get image channel distortions - Compares one or more image channels of an image to a reconstructed image and returns the specified distortion metrics
Get image channel extrema - Gets the extrema for one or more image channels.
Get image channel kurtosis - Get the kurtosis and skewness of a specific channel
Get image channel mean - Gets the mean and standard deviation of one or more image channels.
Get image channel range - Gets the range for one or more image channels.
Get image channel statistics - Returns statistics for each channel in the image.
Get image clip mask - Returns the image clip mask.
Get image color map color - Returns the color of the specified colormap index.
Get image colors - Gets the number of unique colors in the image.
Get image colorspace - Gets the image colorspace.
Get image compose - Returns the composite operator associated with the image.
Get image compression - Gets the current image's compression type.
Get image delay - Gets the image delay.
Get image depth - Gets the image depth.
Get image dispose - Gets the image disposal method.
Get image distortion - Compares an image to a reconstructed image and returns the specified distortion metric.
Get image extrema - Gets the extrema for the image.
Get image filename -
Get image format - Returns the format of a particular image in a sequence.
Get image gamma - Gets the image gamma.
Get image geometry - Returns the width and height as an associative array.
Get image gravity - Gets the current gravity value of the image.
Get image green primary - Returns the chromaticity green primary point. Returns an array with the keys "x" and "y".
Get image height - Returns the image height.
Get image histogram - Returns the image histogram as an array of ImagickPixel objects.
Get image index - Returns the index of the current active image within the Imagick object.
Get image interlace scheme - Gets the image interlace scheme.
Get image interpolate method - Returns the interpolation method for the specified image.
Get image iterations - Gets the image iterations.
Get image length - Returns the image length in bytes.
Get image magick license - Returns a string containing the ImageMagick license
Get image matte - Returns TRUE if the image has a matte channel otherwise false.
Get image matte color - Returns the image matte color.
Get image orientation - Gets the image orientation.
Get image page - Returns the page geometry associated with the image
Get image pixel color - Returns the color of the specified pixel.
Get image profile - Returns the named image profile.
Get image profiles - Returns all associated profiles that match the pattern.
Get image properties - Returns all associated properties that match the pattern.
Get image property - Returns the named image property.
Get image red primary - Returns the chromaticity red primary point as an array with the keys "x" and "y".
Get image region - Extracts a region of the image and returns it as a new Imagick object.
Get image rendering intent - Gets the image rendering intent.
Get image resolution - Gets the image X and Y resolution.
Get image scene - Gets the image scene.
Get image signature - Generates an SHA-256 message digest for the image pixel stream.
Get image size - Returns the image length in bytes.
Get image ticks per second - Gets the image ticks-per-second.
Get image total ink density - Gets the image total ink density.
Get image type - Gets the potential image type.
Get image units - Gets the image units of resolution.
Get image virtual pixel method - Returns the virtual pixel method for the specified image.
Get image white point - Returns the chromaticity white point as an associative array with the keys "x" and "y".
Get image width - Returns the image width.
Get images blob - Implements direct to memory image formats.
Get interlace scheme - Gets the object interlace scheme.
Get iterator index - Returns the index of the current active image within the Imagick object.
Get number images - Returns the number of images associated with Imagick object.
Get option - Returns a value associated within the object for the specified key.
Get package name - Returns the ImageMagick package name.
Get page - Returns the page geometry associated with the Imagick object
Get pixel iterator - Returns a MagickPixelIterator.
Get pixel region iterator - Get an ImagickPixelIterator for an image section.
Get point size - Returns the objects point size property.
Get quantum depth - Returns the Imagick quantum depth as a string.
Get quantum range - Returns the Imagick quantum range as a string.
Get release date - Returns the ImageMagick release date as a string.
Get resource - Returns the specified resource's memory usage in megabytes.
Get resource limit - Returns the specified resource limit in megabytes.
Get sampling factors - Gets the horizontal and vertical sampling factor.
Get size - Returns the size associated with the Imagick object
Get size offset - Returns the size offset associated with the Imagick object.
Get version - Returns the ImageMagick API version as a string and as a number.

H
Hald clutImage - Replaces colors in the image using a Hald lookup table.
Has next image - Checks if the object has more images
Has previous image - Checks if the object has a previous image

I
Identify image - Identifies an image and returns the attributes.
Imagick version - Imagick version
Imagick version - Imagick version
Implode image - Creates a new image that is a copy of an existing one with the image pixels "imploded" by the specified percentage.
Import image pixels - Imports pixels from an array into an image.
Is similar - Checks the distance between the color described by this ImagickPixel object

L
Label image - Adds a label to an image.

l
levelImage - Adjusts the levels of an image by scaling the colors falling between specified white and black points to the full available quantum range.

L
Linear stretchImage - Stretches with saturation the image intensity.
Liquid rescale image - This method scales the images using liquid rescaling method.

M
Magnify image - Is a convenience method that scales an image proportionally to twice its original size.
Map image - Replaces the colors of an image with the closest color from a reference image.
Matte flood fill image - Changes the transparency value of any pixel that matches target and is an immediate neighbor.
Median filter image - Applies a digital filter that improves the quality of a noisy image.
Merge image layers - Merges image layers into one.
Minify image - Is a convenience method that scales an image proportionally to one-half its original size

m
modulateImage - Lets you control the brightness, saturation, and hue of an image.

M
Montage image - Creates a composite image by combining several separate images.
Morph images - Method morphs a set of images.
Mosaic images - Inlays an image sequence to form a single coherent picture.
Motion blur image - Simulates motion blur.

N
Negate image - Negates the colors in the reference image.
New image - Creates a new image and associates ImagickPixel value as background color
Newpseudo image - Creates a new image using ImageMagick pseudo-formats.
Next image - Associates the next image in the image list with an Imagick object.
Normalize image - Enhances the contrast of a color image by adjusting the pixels color to span the entire range of colors available.

O
Oil paint image - Applies a special effect filter that simulates an oil painting.
Opaque paint image - Changes any pixel that matches color with the color defined by fill.
Optimize image layers - Compares each image the GIF disposed forms of the previous image in the sequence.
Ordered posterize image - Performs an ordered dither based on a number of pre-defined dithering threshold maps.

P
Paint floodfill image - Changes the color value of any pixel that matches target and is an immediate neighbor.
Paint opaque image - Changes any pixel that matches color with the color defined by fill.
Paint transparent image - Changes any pixel that matches color with the color defined by fill.
Ping image - This method can be used to query image width, height, size, and format without reading the whole image in to memory.
Ping image blob - This method can be used to query image width, height, size, and format without reading the whole image to memory.
Ping image file - This method can be used to query image width, height, size, and format without reading the whole image to memory.
Polaroid image - Simulates a Polaroid picture.
Posterize image - Reduces the image to a limited number of color level.
Preview images - Tiles 9 thumbnails of the specified image with an image processing operation applied at varying strengths.
Previous image - Assocates the previous image in an image list with the Imagick object.
Profile image - Adds or removes a ICC, IPTC, or generic profile from an image.

Q
Quantize image - Analyzes the colors within a reference image
Quantize images - Analyzes the colors within a sequence of images
Query font metrics - Returns a multi-dimensional array representing the font metrics.
Query fonts - Returns the configured fonts.
Query formats - Returns formats supported by Imagick.

R
Radial blur image - Radial blurs an image.
Raise image - Creates a simulated three-dimensional button-like effect by lightening and darkening the edges of the image.
Random threshold image - Changes the value of individual pixels based on the intensity of each pixel compared to threshold.
Read image - Reads image from filename.
Read image blob - Reads image from a binary string.
Read image file - Reads image from open filehandle
Recolor image - Translate, scale, shear, or rotate image colors.
Reduce noise image - Smooths the contours of an image while still preserving edge information.
Remap image - Replaces colors an image with those defined by replacement.
Remove image - Removes an image from the image list.
Remove image profile - Removes the named image profile and returns it.
Render - Renders all preceding drawing commands.
Resample image - Resample image to desired resolution.
Reset image page - The page definition as a string.
Resize image - Scales an image to the desired dimensions with a filter.
Roll image - Offsets an image as defined by x and y.
Rotate image - Rotates an image the specified number of degrees.
Round corners - Rounds image corners.

S
Sample image - Scales an image to the desired dimensions with pixel sampling.
Scale image - Scales the size of an image to the given dimensions.
Segment image - Analyses the image and identifies units that are simila
Separate image channel - Separates a channel from the image and returns a grayscale image.
Sepia tone image - Applies a special effect to the image, similar to the effect achieved in a photo darkroom by sepia toning.
Set background color - Sets the object's default background color.
Set color - Sets the color described by the ImagickPixel object
Set colorspace - Sets the global colorspace value for the object.
Set compression quality - Sets the object's default compression type.
Set filename - Sets the filename before you read or write an image file.
Set first iterator - Sets the Imagick iterator to the first image.
Set font - Sets object's font property.
Set format - Sets the format of the Imagick object.
Set gravity - Sets the global gravity property for the Imagick object.
Set image - Replaces the current image sequence with the image from replace object.
Set image alpha channel - Activate or deactivate image alpha channel.
Set image artifact - Associates an artifact with the image.
Set image background color - Sets the image background color.
Set image bias - Sets the image bias for any method that convolves an image (e.g. ConvolveImage()).
Set image blue primary - Sets the image chromaticity blue primary point.
Set image border color - Sets the image border color.
Set image channel depth - Sets the depth of a particular image channel.
Set image clip mask - Sets image clip mask from another Imagick object.
Set image colormap color - Sets the color of the specified colormap index.
Set image colorspace - Sets the image colorspace.
Set image compose - Sets the image composite operator.
Set image compression - Sets the image compression
Set image compression quality - Sets the image compression quality.
Set image delay - Sets the image delay.
Set image depth - Sets the image depth.
Set image dispose - Sets the image disposal method.
Set image extent - Sets the image size (i.e. columns & rows).
Set image filename - Sets the filename of a particular image in a sequence.
Set image format - Sets the format of a particular image in a sequence.
Set image gamma - Sets the image gamma.
Set image gravity - Sets the gravity property for the current image.
Set image green primary - Sets the image chromaticity green primary point.
Set image index - Set the iterator to the position in the image list specified with the index parameter.
Set image interlace scheme - Sets the image compression.
Set image interpolate method - Sets the image interpolate pixel method.
Set image matte - Sets the image matte channel.
Set image matte color - Sets the image matte color.
Set image opacity - Sets the image to the specified opacity level.
Set image orientation - Sets the image orientation.
Set image page - Sets the page geometry of the image.
Set image profile - Adds a named profile to the Imagick object.
Set image property - Sets a named property to the image.
Set image red primary - Sets the image chromaticity red primary point.
Set image rendering intent - Sets the image rendering intent.
Set image resolution - Sets the image resolution.
Set image scene - Sets the image scene.
Set image ticks per second - Sets the image ticks-per-second.
Set image type - Sets the image type.
Set image units - Sets the image units of resolution.
Set image virtual pixel method - Sets the image virtual pixel method.
Set image white point - Sets the image chromaticity white point.
Set interlace scheme - Sets the image compression.
Set iterator index - Set the iterator to the position in the image list specified with the index parameter.
Set last iterator - Sets the Imagick iterator to the last image.
Set option - Associates one or more options with the wand.
Set page - Sets the page geometry of the Imagick object.
Set point size - Sets object's point size property.
Set resolution - Sets the image resolution.
Set resource limit - Sets the limit for a particular resource in megabytes.
Set sampling factors - Sets the image sampling factors.
Set size - Sets the size of the Imagick object.
Set size offset - Sets the size and offset of the Imagick object.
Set type -
SetImageIterations - Sets the image iterations.
Shade image - Shines a distant light on an image to create a three-dimensional effect.

s
shadowImage - Simulates an image shadow.

S
Sharpen image - Sharpens an image.
Shave image - Shaves pixels from the image edges.
Shear image - Slides one edge of an image along the X or Y axis, creating a parallelogram.

s
sigmoidalContrastImage - Adjusts the contrast of an image with a non-linear sigmoidal contrast algorithm.

S
Sketch image - Simulates a pencil sketch.

s
solarizeImage - Applies a special effect to the image, similar to the effect achieved in a photo darkroom by selectively exposing areas of photo sensitive paper to light.

S
Sparse color image - Interpolates colors
Splice image - Splices a solid color into the image
Spread image - Special effects method that randomly displaces each pixel in a block defined by the radius parameter.
Stegano image - Hides a digital watermark within the image.
Stereo image - Composites two images
Strip image - Strips an image of all profiles and comments.
Swirl image - Swirls the pixels about the center of the image.

T
Texture image - Repeatedly tiles the texture image across and down the image canvas.
Threshold image - Changes the value of individual pixels based on the intensity of each pixel compared to threshold.
Thumbnail image - Changes the size of an image
Tint image - Applies a color vector to each pixel in the image.
Transform image - A convenience method for setting crop size and the image geometry from strings.
Transparent paint image - Paints pixels matching the target color transparent.
Transpose image - Creates a vertical mirror image by reflecting the pixels around the central x-axis while rotating them 90-degrees.
Transverse image - Creates a horizontal mirror image by reflecting the pixels around the central y-axis while rotating them 270-degrees.
Trim image - Remove edges that are the background color from the image.

U
Unique image colors - Discards all but one of any pixel color.
Unsharp mask image - Sharpens an image.

V
Valid - Checks if the current item is valid.
Vignette image - Softens the edges of the image in vignette style.

W
Wave image - Applies a wave filter to the image.
White threshold image - Force all pixels above the threshold into white.
Write image file - Writes an image to a filehandle
Write images - Writes an image or image sequence.
Write images file - Writes all image frames into an open filehandle.

w
writeImage - Writes an image to the specified filename.

These examples were generated using:
Imagick API version 1608
ImageMagick 6.4.8 2010-10-13 Q16


( More Imagick information on the php website )