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 convert operators

These examples were all generated using ImageMagick 6.7.3 Q16

Most of these operators can be used with V6 and V7 and if not the version number is indicated next to the operator information.


There are 284 operators listed here


A
Adaptive blur - Adaptively blur pixels, with decreasing effect near the edges. (6&7)
Adaptive resize - Resize the image using data-dependent triangulation. (6&7)
Adaptive sharpen - Adaptively sharpen pixels, with increasing effect near edges. (6&7)
Adjoin - Join images into a single multi-image file. (6&7)
Affine - Set the drawing transformation matrix for combined rotating and scaling. (6)
Alpha - Gives control of the alpha/matte channel of an image. (6&7)
Alpha discrete - Treat the alpha channel independently (do not blend). (7)
Annotate - Annotate an image with text - angle option (6&7)
Antialias - Enable/Disable of the rendering of anti-aliasing pixels when drawing fonts and lines. (6&7)
Antialias off - Enable/Disable of the rendering of anti-aliasing pixels when drawing fonts and lines. (6&7)
Append - Join current images vertically or horizontally. (6&7)
Append horizontal - Join current images vertically or horizontally. (6&7)
Attenuate - Lessen (or intensify) when adding noise to an image. (6&7)
Authenticate - Decrypt a PDF with a password. (6&7)
Auto gamma - Automagically adjust gamma level of image. (6&7)
Auto level - Automagically adjust color levels of image. (6&7)
Auto orient - Automagically orient (rotate) an image created by a digital camera. (6&7)
Average - Average a set of images. (6)

B
Backdrop - Display the image centered on a backdrop. (6&7)
Background - (6&7)
Bench - Measure performance.
(6&7)
Bias - Add bias when convolving an image. (6&7)
Black threshold - (6&7)
Blackpoint compensation - Blackpoint compensation for a colour profile. (6&7)
Blend - Blend an image into another by the given percent. (6&7)
Blue primary - Set the blue chromaticity primary point. (6&7)
Blue shift - Simulate a scene at nighttime in the moonlight. Start with a factor of 1.5 (6&7)
Blur - Reduce image noise and reduce detail levels. (6&7)
Border - Surround the image with a border of color. (6&7)
Border color - Set the border color. (6&7)
Border width - The width of the border. (6&7)
Brightness contrast - Adjust the brightness and/or contrast of the image (6&7)

C
Cache - (6&7)
Caption - Assign a caption to an image. (6&7)
CDL - Color correct with a color decision list. (6&7)
Channel - Work on the specified image channel (6&7)
Charcol - Simulate a charcoal drawing. (6&7)
Chop - Remove pixels from the interior of an image. (6&7)
Clamp - Restrict image colors from 0 to the quantum depth. (6&7)
Clip - Apply the clipping path if one is present. (6&7)
Clip mask - Clip the image as defined by this mask. (6&7)
Clip path - Clip along a named path from the 8BImageMagick profile. (6&7)
Clone - Make a copy of an image (or images). (6&7)
Clut - Replace the channel values in the first image using each corresponding channel in the second image as a color lookup table. (6&7)
Coalesce - Fully define the look of each frame of an GIF animation sequence, to form a 'film strip' animation. (6&7)
Color matrix - Apply a color correction to the image (6&7)
Colorize - Colorize the image by an amount specified by value using the color specified by the most recent -fill setting. (6&7)
Colormap - Define the colormap type. (6&7)
Colors - Set the preferred number of colors in the image. (6&7)
Colorspace - Set the image colorspace. (6&7)
Combine - Combine one or more images into a single image. (6&7)
Comment - Embed a comment in an image. (6&7)
Compare - Mathematically and visually annotate the difference between two images. (6&7)
Complex - Perform complex mathematics on an image sequence (6&7)
Compose - Set the type of image composition. (6&7)
Composite - Perform alpha composition on the current image sequence. (6&7)
Compress - Use pixel compression specified by type when writing the image. (6&7)
Contrast - Enhance or reduce the image contrast. (6&7)
Contrast stretch - Increase the contrast in an image by stretching the range of intensity values. (6&7)
Convolve - Convolve an image with a user supplied convolution kernel. (6&7)
Crop - Cut out one or more rectangular regions of the image. (6&7)
Cycle - Displace image colormap by amount. (6&7)

D
Debug - Enable debug printout. (6&7)
Decipher - Decipher and restore pixels that were previously transformed by -encipher. (6&7)
Deconstruct - Find areas that has changed between images (6)
Define - add specific global settings generally used to control coders and image processing operations (6&7)
Delay - Display the next image after pausing. (6&7)
Delete - Delete the image, specified by its index, from the image sequence. (6&7)
Density - Set the horizontal and vertical resolution of an image for rendering to devices. (6&7)
Depth - Depth of the image. (6&7)
Descend - Obtain image by descending window hierarchy. (6&7)
Deskew - Straighten an image. A threshold of 40% works for most images. (6&7)
Despeckle - Reduce the speckles within an image. (6&7)
Direction - Render text right-to-left or left-to-right. (6&7)
Displace - Shift image pixels as defined by a displacement map. (6&7)
Display - Specifies the X server to contact. (6&7)
Dispose - Define the GIF disposal image setting for images that are being created or read in. (6&7)
Dissimilarity threshold - Maximum RMSE for subimage match (default 0.2). (6&7)
Dissolve - Dissolve an image into another by the given percent. (6&7)
Distort - Distort an image, using the given method and its required arguments. (6&7)
Distribute cache - Launch a distributed pixel cache server. (6&7)
Dither - Apply a Riemersma or Floyd-Steinberg error diffusion dither to images. (6&7)
Dither - (6&7)
Draw arc - Annotate an image with one or more graphic primitives. (6&7)
Duplicate - Duplicate an image one or more times. (6&7)

E
Edge - Detect edges within an image. (6&7)
Emboss - Emboss an image. (6&7)
Encipher - Encipher pixels for later deciphering by -decipher. (6&7)
Encoding - Specify the text encoding. (6&7)
Endian - Specify endianness (MSB or LSB) of the image. (6&7)
Enhance - Apply a digital filter to enhance a noisy image. (6&7)
Equalize - Perform histogram equalization on the image channel-by-channel. (6&7)
Evaluate - (6&7)
Evaluate sequence - Alter channel pixels by evaluating an arithmetic, relational, or logical expression over a sequence of images. (6&7)
Exit - Stop processing at this point (7)
Extent - Set the image size and offset. (6&7)
Extract - Extract the specified area from image. (6&7)

F
Family - Set a font family for text. (6&7)
Features - Display (cooccurrence matrix) texture measure features for each channel in the image in each of four directions (horizontal, vertical, left and right diagonals) for the specified distance. (6&7)
FFT - Implements the forward discrete Fourier transform (DFT). (6&7)
Fill - Color to use when filling a graphic primitive. (6&7)
Filter - Filter to be used during resize. (6&7)
Flatten - This is a simple alias for the -layers method "flatten". (6&7)
Flip - Create a mirror image. (6&7)
Floodfill - Floodfill the image with color at the specified offset. (6&7)
Flop - Reflect the image in the horizontal direction. (6&7)
Font - Set the font to be used with draw, annotate etc. (6&7)
Foreground - Define the foreground color. (6&7)
Format - Output formatted image characteristics. (6&7)
Frame - A frame around the image (6&7)
Function - Apply a function to channel values. (6&7)
Fuzz - Fuzz can be used to select a range of colours and in the example is used with transparent. (6&7)
Fx - The Fx special effects image operator is used to apply a mathematical expression to an image or image channels. (6&7)

G
Gamma - Level of gamma correction. (6&7)
Gaussian blur - Blur the image with a Gaussian operator. (6&7)
Geometry - Geometry sets the coordinates for the modification. (6&7)
Gravity - Gravity sets the location of the modification. (6&7)
Grayscale - Convert image to grayscale. (6&7)
Green primary - Green chromaticity primary point. (6&7)

H
Hald clut - Apply a Hald color lookup table to the image. (6&7)
Help - Display the help file (6&7)
Highlight color - When comparing images, emphasize pixel differences with this color. (6&7)

I
Icon Geometry - Specify the icon geometry. (6&7)
Iconic - Iconic animation (6&7)
Identify - Identify the format and characteristics of the image. (6&7)
IFT - Implements the inverse discrete Fourier transform (DFT). (6&7)
Immutable - Make image immutable. (6&7)
Implode - Implode image pixels about the center. (6&7)
Insert - Insert the last image into the image sequence. (6&7)
Intensity - Method to generate intensity value from pixel. (6&7)
Intent - Use this type of rendering intent when managing the image color. (6&7)
Interlace - The type of interlacing scheme. (6&7)
Interline spacing - The space between two text lines. (6&7)
Interpolate - Set the pixel color interpolation method to use when looking up a color based on a floating point or real value. (6)
Interword spacing - The space between words. (6&7)

K
Kerning - The space between letters. (6&7)

L
Label - Not displayed but added to the image. (6&7)
Lat - Perform local adaptive threshold. (6&7)
Layers - Handle multiple images forming a set of image layers or animation frames. (6&7)
Level - Adjust the level of image channels. (6&7)
Level colors - Adjust the level of an image using the provided dash seperated colors. (6&7)
Limit - Set the resource limit. (6&7)
Linear stretch - Linear with saturation stretch. (6&7)
Linewidth - Linewidth is depreciated use strokewidth. (6&7)
Liquid rescale - Rescale image with seam-carving. (6&7)
List - List some operator options (6&7)
Log - Specify the format for the debug log. (6&7)
Loop - Add Netscape loop extension to your GIF animation. (6&7)
Lowlight color - When comparing images, de-emphasize pixel differences with this color. (6&7)

M
Magnify - magnify the image. (6&7)
Map - Display image using a specified type. (6)
Mask - Composite the image pixels as defined by the mask. (6)
Mattecolor - Sets the color for -frame (6&7)
Median - Apply a median filter to the image. (6&7)
Metric - Output to STDERR a measure of the differences between images according to the type given metric. (6&7)
Mode - Mode of operation. (6&7)
Modulate - Vary the brightness, saturation, and hue of an image. (6&7)
Moments - Report image moments. (6&7)
Monitor - Monitor progress. (6&7)
Monochrome - Transform the image to black and white. (6&7)
Morph - Morphs an image sequence. (6&7)
Morphology - apply a morphology method to the image. (6&7)
Mosaic - A simple alias for the -layers method "mosaic". (6&7)
Motion blur - (6&7)

N
Name - Name an image. (6&7)
Negate - Replace every pixel with its complementary color. (6&7)
Noise - Add and remove noise (6&7)
Normalize - Increase the contrast in an image by stretching the range of intensity values. (6&7)

O
Opaque - Opaque using fill for the replacement colour and -fuzz to select a range. (6&7)
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. (6&7)
Orient - Specify orientation of a digital camera image. (6&7)

P
Page - Set the size and location of an image on the larger virtual canvas. (6&7)
Page - Set the size and location of an image on the larger virtual canvas. (6&7)
Paint - Oil paint effect. (6&7)
Path - Write images to this path on the disk. (6&7)
Pause - Pause between animation loops. (6&7)
Perceptible - set each pixel whose value is less than |epsilon| to -epsilon or epsilon (whichever is closer) otherwise the pixel value remains unchanged. (6&7)
Ping - Efficiently determine image characteristics. (6&7)
Pointsize - Set the font size to be used with draw, annotate etc. (6&7)
Polaroid - Polaroid effect. (6&7)
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 (6&7)
Posterize - Reduce the image to a limited number of color levels. (6&7)
Precision - Set the maximum number of significant digits to be printed. (6&7)
Preview - Image preview type. (6&7)
Print - Interpret string and print to console. (6&7)
Process - Process the image with a custom image filter. (6&7)
Profile - Manage ICM, IPTC, or generic profiles in an image. (6&7)

Q
Quality - Specify the output image quality. (6&7)
Quantize - Reduce colors in this colorspace. (6&7)
Quite - Suppress all warning messages. (6&7)

R
Radial blur - Blur around the center of the image. (6&7)
Raise - Lighten or darken image edges. (6&7)
Raise - Lighten or darken image edges. (6&7)
Read - Explicit read of an image, rather than an implicit read. (7)
Read mask - Prevent updates to image pixels specified by the mask (7)
Red primary - Set the red chromaticity primary point. (6&7)
Regard warnings - Pay attention to warning messages. (6&7)
Region - Set a region in which subsequent operations apply. (6&7)
Remap - Reduce the number of colors in an image to the colors used by this image. (6&7)
Remote - Perform a remote operation. (6&7)
Render - Render vector operations. (6&7)
Repage - Adjust the canvas and offset information of the image. (6&7)
Resample - Resample image to specified horizontal and vertical resolution. (6&7)
Resize - Resize the image and leave EXIF data etc. (6&7)
Respect parenthases - Settings remain in effect until parenthesis boundary. (6&7)
Reverse - Reverse the order of images in the current image list. (6&7)
Roll - (6&7)
Rotate - Rotate the image (6&7)

S
Sample - Scale image using pixel sampling. (6&7)
Scale - Different type of resizing an image (6&7)
Scene - Set scene number. (6&7)
Screen - Specify the screen to capture. (6&7)
Script - Stop the processing of command line arguments as image operations, and read all further options from the given file or pipeline. (7)
Seed - Seed a new sequence of pseudo-random numbers. (6&7)
Segment - Segment the colors of an image. (6&7)
Selective blur - Selectively blur pixels within a contrast threshold. (6&7)
Separate - Separate an image channel into a grayscale image. (6&7)
Sepia tone - Sepia effect. (6&7)
Set - Set an image attribute for all images in the current image sequence, after they have been created or read in. (6&7)
Shade - Shade the image using a distant light source. (6&7)
Shadow - Simulate an image shadow. (6&7)
Shared memory - Use shared memory. (6&7)
Sharpen - sharpen the image. (6&7)
Shave - Shave pixels from the image edges. (6&7)
Shear - Shear the image along the x-axis and/or y-axis. (6&7)
Sigmoidal contrast - Increase the contrast without saturating highlights or shadows. (6&7)
Silent - Operate silently. (6&7)
Similarity threshold - Minimum RMSE for subimage match. (6&7)
Size - Set the width and height of the image. (6&7)
Sketch - Simulate a pencil sketch. (6&7)
Smush - It does more than just append with a overlap. It appends images with shape, and allowing one shape to fit into another shape. (6&7)
Snaps - Set the number of screen snapshots. (6&7)
Solarize - Negate all pixels above the threshold level. (6&7)
Sparse color - Color the given image using the specified points of color, and filling the other intervening colors using the given methods. (6&7)
Splice - Splice the current background color into the image. (6&7)
Spread - Displace image pixels by a random amount. (6&7)
Stegano - Hide watermark within an image. (6&7)
Stereo - Composite two images to create a stereo anaglyph. (6&7)
Storage type - Pixel storage type. (6&7)
Stretch - Set a type of stretch style for fonts. (6&7)
Strip - Strip the image of any profiles or comments. (6&7)
Stroke - Color to use when stroking a graphic primitive. (6&7)
Strokewidth - Strokewidth sets the line width. (6&7)
Style - Set a font style for text - limited options (6&7)
Swap - Swap the positions of two images in the image sequence. (6&7)
Swirl - Swirl image pixels about the center. (6&7)

T
Taint - Mark the image as modified even if it isn't. (6&7)
Text font - Font for writing fixed-width text. (6&7)
Texture - Name of texture to tile onto the image background. (6&7)
Threshold - Apply simultaneous black/white threshold to the image. (6&7)
Thumbnail - Resize and thumbnail have the same effect but thumbnail strips the EXIF data etc. (6&7)
Tile - Set the tile image used for filling a subsequent graphic primitive. (6&7)
Tile offset - Specify the offset for tile images, relative to the background image it is tiled on. (6&7)
Tint - Tint the image with the fill color. (6&7)
Title - Assign a title to displayed image. (6&7)
Transform - Transform the image. (6)
Transparent - Make this color transparent within the image. (6&7)
Transparent color - Set the transparent colour. (6&7)
Transparent inverted - Make all colours except this color transparent within the image. (6&7)
Transpose - Mirror the image along the top-left to bottom-right diagonal. (6&7)
Transverse - Mirror the image along the images bottom-left top-right diagonal. (6&7)
Treedepth - Tree depth for the color reduction algorithm. (6&7)
Trim - Trim an image. (6&7)
Type - The image type. (6&7)

U
Undercolor - Set the color of the annotation bounding box. (6&7)
Unique colors - Discard all but one of any pixel color from the image. (6&7)
Units - The units of image resolution. (6&7)
Unsharp - Sharpen the image with an unsharp mask operator. (6&7)
Update - Detect when image file is modified and redisplay. (6&7)

V
Verbose - Print detailed information about the image when this option preceds the -identify option or info: (6&7)
Version - Print ImageMagick version. (6&7)
View - FlashPix viewing parameters. (6&7)
Vignette - soften the edges of the image in vignette style. (6&7)
Virtual pixel - Specify contents of virtual pixels. (6&7)
Visual - Animate images using this X visual type. (6&7)

W
Watermark - Watermark an image using the given percentages of brightness and saturation. (6&7)
Wave - Shear the columns of an image into a sine wave. (6&7)
Weight - Set a font weight for text. (6&7)
White point - Chromaticity white point. (6&7)
White threshold - Force to white all pixels above the threshold while leaving all pixels at or below the threshold unchanged. (6&7)
Window - Make the image the background of a window. (6&7)
Window-group - Specify the window group. (6&7)
Write - Write an image sequence. (6&7)
Write mask - Prevent pixels from being written. (7)