Imagemagick operators page: 19

Transparent inverted

Make all colours except this color transparent within the image.

Transparent inverted example
"$input -fuzz 10% +transparent #7b1216 ";  
exec("convert $cmd plus_transparent.png"); 

( Save as a png to retain the transparency. -fuzz can be used to select a range of colours. )


Mirror the image along the top-left to bottom-right diagonal.

Transpose example
"$input -transpose"
exec("convert $cmd transpose.jpg");


Mirror the image along the images bottom-left top-right diagonal.

Transverse example
"$input -transverse"
exec("convert $cmd transverse.jpg");


Tree depth for the color reduction algorithm.

More information to follow.


Trim an image.

Trim example
"strokewidth.jpg -trim "
exec("convert $cmd trim.png");

( -fuzz can be added if the the border colour varies slightly. )


The image type.

Type example
"$input -type Grayscale";  
exec("convert $cmd type.jpg");

( Choose from: Bilevel, Grayscale, GrayscaleMatte, Palette, PaletteMatte, TrueColor, TrueColorMatte, ColorSeparation, or ColorSeparationMatte. )


Set the color of the annotation bounding box.

Undercolor example
"$input -fill Black -pointsize 40 -gravity center"
" -undercolor NavajoWhite -annotate +0+0 \"Undercolor\""
exec("convert $cmd undercolor.jpg");

Unique colors

Discard all but one of any pixel color from the image.

Unique colors example
"$input4 -unique-colors -resize x20"
exec("convert $cmd unique_colors.jpg");

( Will create an image 1px high and VERY wide if your image contains a lot of colours. I have resized the height to 20px to see the colours. )


The units of image resolution.

Units example
"$input -density 200x200".
" -units PixelsPerInch";  
exec("convert $cmd units.jpg");


Sharpen the image with an unsharp mask operator.

Unsharp example
"$input -unsharp 1.5"
exec("convert $cmd unsharp_simple.jpg");


Detect when image file is modified and redisplay.

Not used with php


Print detailed information about the image when this option preceds the -identify option or info:

Image: input.jpg
Format: JPEG (Joint PhotographicExperts Group JFIF format)
Class: DirectClass
Geometry: 266x200+0+0
Resolution: 72x72
Print size: 3.69444x2.77778

("convert $input -verbose -identify ");

( Will output an A4 size sheet of information about an image. )


Print ImageMagick version.

Version: ImageMagick 6.7.3-6 2011-11-10 Q16
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC

Features: OpenMP

echo "<pre>"
system("convert -version");   

( As we want the version displayed use system not exec. )


FlashPix viewing parameters.

Not used with php.