Main TclMagick TkMagick SourceForge.net Logo

A Tcl interface to ImageMagick & GraphicsMagick

TclMagick is a Tcl wrapper for ImageMagick's high-level Wand interface. It lets you convert and manipulate a large variety of image formats, and importantly, does not require the Tk toolkit or an active windowing system!

There is also a TkMagick module, which exists to bridge TclMagick and Tk. It lets you use make Tk images from data loaded with TclMagick, and vice versa.

http://www.imagemagick.org
http://www.graphicsmagick.org

TclMagick doesn't add any intelligence to ImageMagick, except some Tclification with optional command arguments. The wrapping of ImageMagick's Wand-API should be mostly obvious, so there is no need for extensive, separate TclMagick documentation. For a more detailed description of methods refer to the Wand-API documentation.

There are three different ImageMagick object types: MagickWand, DrawingWand and PixelWand. In TclMagick these objects are called wand, drawing and pixel. They are created and deleted with the magick command similar to Tcl's imagecommand. Wand-API methods are then called as subcommands of the created TclMagick object.
If an ImageMagick-API allows a NULL object argument, it can be specified as an empty string {} or "".

General design:

There is one main command: magick - Create/delete Magick "wand", "drawing", and "pixel" objects

Creating a Magick object creates a command of the same name: magickName subcmd ?args?

Deleting the Magick object also deletes the associated command.

"magick" command

magick subcmd ?args?
magick create type ?name?
# Create a TclMagick object of type
  • type="wand", "drawing", "pixel"
  • returns: object name
magick delete name ?name? ...
# Delete TclMagick objects
magick names ?type? # Return all TclMagick objects (of type)
magick type name # Return the type of the object
magick types # Return valid type names
magick resourcelimit resource ?limit? MagickGet/SetResourceLimits
  • resource="undefined", "area", "disk", "file", "map", "memory"
  • unsigned limit
magick fonts ?pattern?
MagickQueryFonts
  • string pattern (default="*")
  • returns stringList (all matching fonts)
magick formats ?pattern?
MagickQueryFormats
  • string pattern (default="*")
  • returns stringList (all matching image formats)
magick library
magick library -copyright
magick library -date
magick library -maxrgb
magick library -name
magick library -quantumdepth
magick library -url
magick library -version
magick library -versionstr
# Returns all options
MagickGetCopyright
MagickGetReleaseDate
MagickGetQuantumDepth
MagickGetPackageName
MagickGetQuantumDepth
MagickGetHomeURL
MagickGetVersion
MagickGetVersion
  • Without -option the return is a list of all -option value ... pairs
  • -quantumdepth returns an integer
  • -version returns a string like "5.5.8"
  • -versionstr returns the complete MagickGetVersion()
  • all others return a string
 
magick version

# Return TclMagick version

  • return string version
 

MagickWand object subcommands

wandName subcmd ?args?
ImageMagick API
wandName adaptivethreshold ?width? ?height? ?ofs?
wandName AdaptiveThresholdImage ?width? ?height? ?ofs?
MagickAdaptiveThresholdImage
MagickAdaptiveThresholdImage
  • integer width,height,ofs
    (default: width=2, height=width, ofs=0)
wandName add wandName
wandName AddImage wandName
MagickAddImage
MagickAddImage
  • MagickWand wandName
wandName addnoise ?noiseType?
wandName AddNoiseImage ?noiseType?
MagickAddNoiseImage
MagickAddNoiseImage
  • string noiseType = "uniform", "gaussian", "multiplicativegaussian", "impulse", "laplacian", "poisson"
    (default: noisetype="uniform")
wandName affinetransform draw
wandName AffineTransformImage draw
MagickAffineTransformImage
MagickAffineTransformImage
  • DrawingWand draw
wandName annotate draw ?x y? ?angle? text
wandName AnnotateImage draw ?x y? ?angle? text
MagickAnnotateImage
MagickAnnotateImage
  • DrawingWand draw
  • double x, y (default=0.0)
  • double angle (default=0.0)
  • string text
wandName append ?stack? ?newName?
wandName AppendImages ?stack? ?newName?
MagickAppendImages
MagickAppendImages
  • bool stack (default=0)
  • string newName
wandName average ?newName?
wandName AverageImages ?newName?
MagickAverageImages
MagickAverageImages
  • string newName
wandName blackthreshold thresholdPixel
wandName BlackThresholdImage thresholdPixel
MagickBlackThresholdImage
MagickBlackThresholdImage
  • PixelWand thresholdPixel
wandName blur ?radius? ?sigma?
wandName BlurImage ?radius? ?sigma?
MagickBlurImage
MagickBlurImage
  • double radius,sigma
    (default: radius=0.0, sigma=1.0)
wandName border borderPixel ?width? ?height?
wandName BorderImage borderPixel ?width? ?height?
  • PixelWand borderPixel
  • integer width,height
    (default: width=1, height=width)
MagickBorderImage
MagickBorderImage
wandName charcoal ?radius? ?sigma?
wandName CharcoalImage ?radius? ?sigma?
MagickCharcoalImage
MagickCharcoalImage
  • double radius,sigma (default: radius=0.0, sigma=1.0)
wandName chop width height ?x y?
wandName ChopImage width height ?x y?
MagickChopImage
MagickChopImage
  • integer width,height,x,y (default: x=y=0)

wandName clip
wandName ClipImage
MagickClipImage
MagickClipImage
  • <none>
wandName clippath pathname ?inside?
wandName ClipPathImage pathname ?inside?
MagickClipPathImage
MagickClipPathImage
  • string pathname
  • bool inside (default=0)
wandName clone ?newName?
wandName CloneWand ?newName?
CloneMagickWand
CloneMagickWand
  • string newName
wandName coalesce ?newName?
wandName CoalesceImages ?newName?
MagickCoalesceImages
MagickCoalesceImages
  • string newNam
wandName colorfloodfill fillPix ?fuzz? ?borderPix? ?x y?
wandName ColorFloodfillImage fillPix ?fuzz? ?borderPix? ?x y?
MagickColorFloodfillImage
MagickColorFloodfillImage
  • PixelWand fillPix,borderPix (default: borderPix=""=>NULL)
  • double fuzz (default=0.0)
  • integer x,y (default: x=y=0)
wandName colorize fillPix opacityPix
wandName ColorizeImage fillPix opacityPix
MagickColorizeImage
MagickColorizeImage

  • PixelWand fillPix,opacityPix
wandName comment str
wandName CommentImage str
MagickCommentImage
MagickCommentImage
  • string str
wandName compare refName
wandName CompareImages refName metric
MagickCompareImages
MagickCompareImages
  • MagickWand refName
  • string metricType =
    "meanabsoluteerror", "meansquarederror", "peakabsoluteerror", "peaksignaltonoiseratio", "rootmeansquarederror"
  • returns double distortion
wandName comparechannels refName chan metric
wandName CompareImageChannels refName chan metric
MagickCompareImageChannels
MagickCompareImageChannels

  • MagickWand refName
  • string channelType = "undefined", "red", "cyan", "green", "magenta", "blue", "yellow, "opacity, "black, "matte", "index"
  • string metricType ="meanabsoluteerror", "meansquarederror", "peakabsoluteerror", "peaksignaltonoiseratio", "rootmeansquarederror"
  • returns double distortion
wandName composite compWand opType ?x y?
wandName CompositeImage compWand opType ?x y?
MagickCompositeImage
MagickCompositeImage
  • string opType = "undefined", "over", "in", "out", "atop", "xor", "plus", "minus", "add", "subtract", "difference", "multiply", "bumpmap", "copy", "copyred", "copygreen", "copyblue", "copyopacity", "clear", "dissolve", "displace", "modulate", "threshold", "no", "darken", "lighten", "hue", "saturate", "colorize", "luminize", "screen", "overlay", "copycyan", "copymagenta", "copyyellow", "copyblack", "replace"
  • MagickWand compWand
  • integer x,y (default: x=y=0)
wandName contrast ?sharpen?
wandName ContrastImage ?sharpen?
MagickContrastImage
MagickContrastImage
  • bool sharpen (default: sharpen=yes)
wandName convolve order kernelData
wandName ConvolveImage order kernelData
MagickConvolveImage
MagickConvolveImage
  • integer order=odd
  • kernelData = list of doubles with (order x order) elements
wandName crop width height ?x y?
wandName CropImage width height ?x y?
MagickCropImage
MagickCropImage
  • integer width,height,x,y (default: x=y=0)
wandName cyclecolormap ?displace?
wandName CycleColormapImage ?displace?
MagickCycleColormapImage
MagickCycleColormapImage
  • integer displace (default: displace=1)
wandName deconstruct ?newName?
wandName DeconstructImages ?newName?
MagickDeconstructImages
MagickDeconstructImages
  • string newName
wandName describe
wandName DescribeImage
MagickDescribeImage
MagickDescribeImage
  • <none>
wandName despeckle
wandName DespeckleImage
MagickDespeckleImage
MagickDespeckleImage
  • <none>
wandName draw draw
wandName DrawImage draw
MagickDrawImage
MagickDrawImage
  • DrawingWand draw
wandName edge ?radius?
wandName EdgeImage ?radius?
MagickEdgeImage
MagickEdgeImage

  • double radius (default: radius=0.0)
wandName emboss ?radius? ?sigma?
wandName EmbossImage ?radius? ?sigma?
MagickEmbossImage
MagickEmbossImage
  • double radius,sigma (default: radius=0.0, sigma=1.0)
wandName enhance
wandName EnhanceImage
MagickEnhanceImage
MagickEnhanceImage
  • <none>
wandName equalize
wandName EqualizeImage
MagickEqualizeImage
MagickEqualizeImage
  • <none>
wandName flatten ?newName?
wandName FlattenImages ?newName?
MagickFlattenImages
MagickFlattenImages
  • string newName
wandName flip
wandName FlipImage
MagickFlipImage
MagickFlipImage
  • <none>
wandName flop
wandName FlopImage
MagickFlopImage
MagickFlopImage
  • <none>
wandName frame framePix ?width? ?height? ?inner? ?outer?
wandName FrameImage framePix ?width? ?height? ?inner? ?outer?
MagickFrameImage
MagickFrameImage
  • PixelWand framePix
  • integer witdh,height,innerBevel,outerBevel
    (default: width=1, height=width, inner=0, outer=inner)
wandname fx expr ?newName?
wandname fxImage expr ?newName?
MagickFxImage
MagickFxImage
  • string expr
  • string newName
wandname fxchannel channelType expr ?newName?
wandname fxImageChannel channelType expr ?newName?
MagickFxImageChannel
MagickFxImageChannel
  • string channelType = "undefined", "red", "cyan", "green", "magenta", "blue", "yellow, "opacity, "black, "matte", "index"
  • string expr
  • string newName
wandName gamma level
wandName GammaImage level
MagickGammaImage
MagickGammaImage
  • double level
wandName gammachannel channelType level
wandName GammaImageChannel channelType level
MagickGammaImageChannel
MagickGammaImageChannel
  • string channelType = "undefined", "red", "cyan", "green", "magenta", "blue", "yellow, "opacity, "black, "matte", "index"
  • double level
wandName filename ?name?
wandName GetFilename
wandName SetFilename name
MagickGet/SetFilename
MagickGetFilename
MagickSetFilename
  • string name
wandName backgroundcolor ?pixel?
wandName GetBackgroundColor ?pixel?
wandName SetBackgroundColor pixel
MagickGet/SetBackgroundColor
MagickGetImageBackgroundColor
MagickSetImageBackgroundColor
  • PixelWand pixel
wandName blueprimary ?x y?
wandName GetBluePrimary
wandName SetBluePrimary x y
MagickGet/SetBluePrimary
MagickGetBluePrimary
MagickSetBluePrimary
  • double x, y
wandName bordercolor ?pixel?
wandName GetBorderColor ?pixel?
wandName SetBorderColor pixel
MagickGet/SetBorderColor
MagickGetImageBorderColor
MagickSetImageBorderColor
  • PixelWand pixel
wandName channeldepth channelType depth
wandName GetChannelDepth channelType
wandName SetChannelDepth channelType depth
MagickGet/SetImageChannelDepth
MagickGetImageChannelDepth
MagickSetImageChannelDepth
  • string channelType = "undefined", "red", "cyan", "green", "magenta", "blue", "yellow, "opacity, "black, "matte", "index"
  • int depth
wandName channelextrema channelType
wandName GetChannelExtrema channelType
MagickGetImageChannelExtrema
MagickGetImageChannelExtrema
  • string channelType = "undefined", "red", "cyan", "green", "magenta", "blue", "yellow, "opacity, "black, "matte", "index"
  • returns intList {min max}
wandName channelmean channelType
wandName GetChannelMean channelType
MagickGetImageChannelMean
MagickGetImageChannelMean
  • string channelType = "undefined", "red", "cyan", "green", "magenta", "blue", "yellow, "opacity, "black, "matte", "index"
  • returns doubleList {mean deviation}
wandName colormapcolor index ?pixel?
wandName GetColormapColor index ?pixel?
wandName SetColormapColor index pixel
MagickGet/SetColormapColor
MagickGetImageColormapColor
MagickSetImageColormapColor
  • int index
  • PixelWand pixel
wandName colors
wandName GetColors
MagickGetImageColors
MagickGetImageColors
  • returns int numColors
wandName colorspace ?colorspaceType?
wandName GetColorspace
wandName SetColorspace colorspaceType
MagickGet/SetImageColorspace
MagickGetImageColorspace
MagickSetImageColorspace
  • string colorspaceType (default="RGB") ="undefined", "RGB", "GRAY", "transparent", "OHTA", "LAB", "XYZ", "YCbCr", "YCC", "YIQ", "YPbPr", "YUV", "CMYK", "sRGB", "HSL", "HWB"
wandName compose ?opType?
wandName GetCompose
wandName SetCompose opType
MagickGet/SetImageCompose
MagickGetImageCompose
MagickSetImageCompose
  • string opType = "undefined", "over", "in", "out", "atop", "xor", "plus", "minus", "add", "subtract", "difference", "multiply", "bumpmap", "copy", "copyred", "copygreen", "copyblue", "copyopacity", "clear", "dissolve", "displace", "modulate", "threshold", "no", "darken", "lighten", "hue", "saturate", "colorize", "luminize", "screen", "overlay", "copycyan", "copymagenta", "copyyellow", "copyblack", "replace"
wandName compression ?compressType?
wandName GetCompression
wandName SetCompression compressType
MagickGet/SetImageCompression
MagickGetImageCompression
MagickSetImageCompression
  • string compressType ="undefined", "none", "bzip", "fax", "group4", "jpeg", "jpeg-ls", "lzw", "rle", "zip"
wandName delay ?delay?
wandName GetDelay
wandName SetDelay delay
MagickGet/SetImageDelay
MagickGetImageDelay
MagickSetImageDelay
  • int delay (1/100 sec)
wandName depth ?depth?
wandName GetDepth
wandName SetDepth depth
MagickGet/SetImageDepth
MagickGetImageDepth
MagickSetImageDepth
  • int depth (bits)
wandName dispose ?disposeType?
wandName GetDispose
wandName SetDispose disposeType
MagickGet/SetImageDispose
MagickGetImageDispose
MagickSetImageDispose
  • string disposeType = "undefined", "none", "background", "previous"
wandName extrema
wandName GetExtrema
MagickGetImageExtrema
MagickGetImageExtrema
  • returns intList {min max}
wandName format
wandName GetFormat
MagickGetImageFormat
MagickGetImageFormat
  • returns string format
wandName gamma ?gamma?
wandName GetGamma
wandName SetGamma gamma
MagickGet/SetImageGamma
MagickGetImageGamma
MagickSetImageGamma
  • double gamma
wandName greenprimary ?x y?
wandName GetGreenPrimary
wandName SetGreenPrimary x y
MagickGet/SetGreenPrimary
MagickGetGreenPrimary
MagickSetGreenPrimary
  • double x, y
wandName heigth
wandName GetHeight
MagickGetImageHeight
MagickGetImageHeight
  • returns int height
wandName index ?index?
wandName GetIndex
wandName SetIndex index
MagickGet/SetImageIndex
MagickGetImageIndex
MagickSetImageIndex
  • int index
wandName interlace ?interlaceType?
wandName GetInterlaceScheme
wandName SetInterlaceScheme interlaceType
MagickGet/SetImageInterlaceScheme
MagickGetImageInterlaceScheme
MagickSetImageInterlaceScheme
  • string interlaceType = "undefined", "none", "line", "plane", "partition"
wandName iterations ?num?
wandName GetIterations
wandName SetIterations num
MagickGet/SetImageIterations
MagickGetImageIterations
MagickSetImageIterations
  • int num
wandName mattecolor ?pixel?
wandName GetMatteColor ?pixel?
wandName SetMatteColor pixel
MagickGet/SetMatteColor
MagickGetImageMatteColor
MagickSetImageMatteColor
  • PixelWand pixel

wandName getimage ?newName?
wandName GetImage ?newName?
wandName setimage name
wandName SetImage name

MagickGetImage
MagickGetImage
MagickSetImage
MagickSetImage

  • string newName
  • MagickWand name
wandName imagefilename ?name?
wandName GetImageFilename
wandName SetImageFilename name
MagickGet/SetImageFilename
MagickGetImageFilename
MagickSetImageFilename
  • string name
wandName pixels x0 y0 cols rows map storageType ?data?
wandName GetPixels x0 .. storageType
wandName SetPixels x0 .. storageType data
MagickGet/SetImagePixels
MagickGetImagePixels
MagickSetImagePixels
  • storageType ="char", "short", "integer", "long", "float", "double"
wandName ProfileImage name ?profile?
wandName RemoveProfile name
MagickProfileImage
MagickRemoveImageProfile
  • string name="*","icc","icm","cptc","8bim",genericProfiles
  • binary profile
wandName profile name ?profile?
wandName GetProfile name
wandName SetProfile name profile
MagickGet/SetImageProfile
MagickGetImageProfile
MagickSetImageProfile
  • string name="*","icc","icm","cptc","8bim",genericProfiles
  • binary profile
wandName redprimary ?x y?
wandName GetRedPrimary
wandName SetRedPrimary x y
MagickGet/SetRedPrimary
MagickGetRedPrimary
MagickSetRedPrimary
  • double x, y
wandName rendering ?renderType?
wandName GetRenderingIntent
wandName SetRenderingIntent renderType
MagickGet/SetImageRenderingIntent
MagickGetImageRenderingIntent
MagickSetImageRenderingIntent
  • string renderType = "undefined", "saturation", "perceptual", "absolute", "relative"
wandName resolution ?x? ?y?
wandName GetResolution
wandName SetResolution x ?y?
MagickSetImageResolution
MagickGetImageResolution
MagickSetImageResolution
  • double x,y (default y=x)
wandName scene ?num?
wandName GetScene
wandName SetScene num
MagickGet/SetImageScene
MagickGetImageScene
MagickSetImageScene
  • int num
wandName imagesize
wandName GetImageSize

MagickGetImageSize
MagickGetImageSize

  • returns wideInt size
wandName signature
wandName GetSignature
MagickGetImageSignature
MagickGetImageSignature
  • returns string signature
wandName imagetype ?type?
wandName GetImageType
wandName SetImageType type
MagickGet/SetImageType
MagickGetImageType
MagickSetImageType
  • string type ="undefined","bilevel","grayscale",
    "grayscalematte","palette","palettematte",
    "truecolor","truecolormatte","colorseparation",
    "colorseparationmatte","optimize"
wandName imageunits ?unitType?
wandName GetImageUnits
wandName SetImageUnits unitType
MagickGet/SetImageUnits
MagickGetImageUnits
MagickSetImageUnits
  • string unitType = "undefined", "ppi", "ppcm",
wandName virtualpixelmethod ?methodType?
wandName GetVirtualPixelMethod
wandName SetVirtualPixelMethod methodType
MagickGet/SetImageVirtualPixelMethod
MagickGetImageVirtualPixelMethod
MagickSetImageVirtualPixelMethod
  • string methodType ="undefined", "constant", "edge", "mirror", "tile"
wandName whitepoint ?x y?
wandName GetWhitePoint
wandName SetWhitePoint x y
MagickGet/SetWhitePoint
MagickGetWhitePoint
MagickSetWhitePoint
  • double x, y
wandName width
wandName GetWidth
MagickGetImageWidth
MagickGetImageWidth
  • returns int width
wandName number
wandName GetNumberImages
MagickGetNumberImages
MagickGetNumberImages
  • returns int number
wandName samplingfactors ?factors?
wandName GetSamplingFactors
wandName SetSamplingFactors factors
MagickGet/SetSamplingFactors
MagickGetSamplingFactors
MagickSetSamplingFactors
  • doubleList factors
wandName size ?x y?
wandName GetSize
wandName SetSize x y
MagickGet/SetSize
MagickGetSize
MagickSetSize
  • int x,y
wandName hasnext
wandName HasNextImage
MagickHasNextImage
MagickHasNextImage
  • returns boolean
wandName hasprevious
wandName HasPreviousImage
MagickHasPreviousImage
MagickHasPreviousImage
  • returns boolean
wandName implode ?amount?
wandName ImplodeImage ?amount?
MagickImplodeImage
MagickImplodeImage
  • double amount (default=0.0)
wandName label str
wandName LabelImage str
MagickLabelImage
MagickLabelImage
  • string str
wandName level ?black? ?gamma? ?white?
wandName LevelImage ?black? ?gamma? ?white?
MagickLevelImage
MagickLevelImage
  • double black,gamma,white
    (default: black=0.0, gama=1.0, white=MaxRGB)
wandName levelchannel channelType ?black? ?gamma? ?white?
wandName LevelImageChannel channelType ?black? ?gamma? ?white?
MagickLevelImageChannel
MagickLevelImageChannel
  • string channelType = "undefined", "red", "cyan", "green", "magenta", "blue", "yellow, "opacity, "black, "matte", "index"
  • double black,gamma,white
    (default: black=0.0, gama=1.0, white=MaxRGB)
wandName magnify
wandName MagnifyImage
MagnifyImage
MagnifyImage
  • <none>
wandName map mapName ?dither?
wandName MapImage mapName ?dither?
MagickMapImage
MagickMapImage
  • MagickWand mapName
  • bool dither (default=no)
wandName mattefloodfill opacity ?fuzz? ?borderPix? ?x y?
wandName MatteFloodfillImage opacity ?fuzz? ?borderPix? ?x y?
MagickMatteFloodfillImage
MagickMatteFloodfillImage
  • int opacity
  • double fuzz (default=0.0)
  • PixelWand borderPix (default: borderPix=none)
  • integer x,y (default: x=y=0)
wandName medianfilter ?radius?
wandName MedianFilterImage ?radius?
MagickMedianFilterImage
MagickMedianFilterImage
  • double radius (default: radius=0.0)
wandName minify
wandName MinifyImage
MagickMinifyImage
MagickMinifyImage
  • <none>
wandName modulate ?brightness? ?saturation? ?hue?
wandName ModulateImage ?brightness? ?saturation? ?hue?
MagickModulateImage
MagickModulateImage
  • double brightness,saturation,hue (default=0.0)
wandName montage draw tileGeom thumbGeom mode frameGeom ?newName?
wandName MontageImage draw tileGeom thumbGeom mode frameGeom ?newName?
MagickMontageImage
MagickMontageImage
  • DrawingWand draw
  • string tileGeom, thumbGeom, frameGeom
  • string mode = "frame", "unframe", "concatenate"
wandName morph num ?newName?
wandName MorphImages num ?newName?
MagickMorphImages
MagickMorphImages
  • integer num
  • string newName
wandName mosaic ?newName?
wandName MosaicImages ?newName?
MagickMosaicImages
MagickMosaicImages
  • string newName
wandName motionblur ?radius? ?sigma? ?angle?
wandName MotionBlurImage ?radius? ?sigma? ?angle?
MagickMotionBlurImage
MagickMotionBlurImage
  • double radius,sigma,angle (default=0.0)
wandName negate ?gray?
wandName NegateImage ?gray?
MagickNegateImage
MagickNegateImage
  • bool gray (default=no)
wandName next ?offset?
wandName NextImage ?offset?
MagickNextImage
MagickNextImage
  • int offset (default = 1)
wandName normalize
wandName NormalizeImage
MagickNormalizeImage
MagickNormalizeImage
  • <none>
wandName oilpaint ?radius?
wandName OilPaintImage ?radius?
MagickOilPaintImage
MagickOilPaintImage
  • double radius (default: radius=0.0)
wandName opaque targetPix fillPix ?fuzz?
wandName OpaqueImage targetPix fillPix ?fuzz?
MagickOpaqueImage
MagickOpaqueImage
  • PixelWand targetPix,fillPix
  • double fuzz (default=0.0)
wandName ping filename
wandName PingImage filename
MagickPingImage
MagickPingImage
  • string filename
wandName preview previewType ?newName?
wandName PreviewImages previewType ?newName?
MagickPreviewImages
MagickPreviewImages
  • integer previewType ="undefined", "rotate", "shear", "roll", "hue", "saturation", "brightness", "gamma", "spiff", "dull", "grayscale", "quantize", "despeckle", "reducenoise", "addnoise", "sharpen", "blur", "threshold", "edgedetect", "spread",
    "solarize", "shade", "raise", "segment", "swirl", "implode", "wave", "oilpaint",
    "charcoal", "jpeg",
  • string newName
wandName previous ?offset?
wandName PreviousImage ?offset?
MagickPreviousImage
MagickPreviousImage
  • int offset (default = 1)
wandName quantize numColors ?colorspaceType? ?treedepth? ?dither? ?measureError?
wandName QuantizeImage numColors colorspaceType treedepth dither measureError
wandName QuantizeImages numColors colorspaceType treedepth dither measureError
MagickQuantizeImage
MagickQuantizeImage
MagickQuantizeImages
  • int numColors
  • string colorspaceType (default="RGB") ="undefined","RGB","GRAY","transparent","OHTA", "LAB","XYZ","YCbCr","YCC","YIQ","YPbPr","YUV", "CMYK","sRGB","HSL","HWB"
  • int treedepth
  • bool dither, measureError (default=no)
wandName queryfontmetrics draw text
wandName QueryFontMetrics draw text
MagickQueryFontMetrics
MagickQueryFontMetrics
  • DrawingWand draw
  • string text
  • returns intList(7)
wandName raise width height ?x y? ?raise?
wandName RaiseImage width height ?x y? ?raise?
MagickRaiseImage
MagickRaiseImage
  • int width,height
  • int x,y (default=0)
  • bool raise (default=no)
wandName read filename
wandName ReadImage filename
MagickReadImage
MagickReadImage
  • string filename
wandName readblob data
wandName ReadImageBlob data
MagickReadImageBlob
MagickReadImageBlob
  • binary data
wandName reducenoise ?radius?
wandName ReduceNoiseImage ?radius?
MagickReduceNoiseImage
MagickReduceNoiseImage
  • double radius (default: radius=0.0)
wandName remove
wandName RemoveImage
MagickRemoveImage
MagickRemoveImage
  • <none>
wandName resetiterator
wandName ResetIterator
MagickResetIterator
MagickResetIterator
  • <none>
wandName resample xRes ?yRes? ?filterType? ?blur?
wandName ResampleImage xRes ?yRes? ?filterType? ?blur?
MagickResampleImage
MagickResampleImage
  • double xRes, yRes, blur (default: yRes=xRes, blur=0.0)
  • filter = "undefined", "point", "box", "triangle", "hermite", "hanning", "hamming", "blackman", "gaussian", "quadratic", "cubic", "catrom", "mitchell", "lanczos", "bessel", "sinc" (default="undefined")
wandName resize x y ?filterType? ?blur?
wandName ResizeImage x y ?filterType? ?blur?
MagickResizeImage
MagickResizeImage
  • int x, y
  • filter = "undefined", "point", "box", "triangle", "hermite",
    "hanning", "hamming", "blackman", "gaussian", "quadratic",
    "cubic", "catrom", "mitchell", "lanczos", "bessel",
    "sinc" (default="undefined")
  • double blur (default =0.0)
wandName roll xOfs yOfs
wandName RollImage xOfs yOfs
MagickRollImage
MagickRollImage
  • int xOfs,yOfs
wandName rotate background degrees
wandName RotateImage background degrees
MagickRotateImage
MagickRotateImage
  • PixelWand background
  • double degrees
wandName sample x y
wandName SampleImage x y
MagickSampleImage
MagickSampleImage
  • int x,y
wandName separate channelType
wandName SeparateImageChannel channelType
MagickSeparateImageChannel
MagickSeparateImageChannel
  • string channelType = "undefined", "red", "cyan", "green", "magenta", "blue", "yellow, "opacity, "black, "matte", "index"
wandName scale x y
wandName ScaleImage x y
MagickScaleImage
MagickScaleImage
  • int x,y
wandName setoption format key value
wandName SetOption format key value
MagickSetImageOption
MagickSetImageOption
  • string format, key, value
wandName passphrase phrase
wandName SetPassphrase phrase
MagickSetPassphrase
MagickSetPassphrase
  • string phrase
wandName sharpen ?radius? ?sigma?
wandName SharpenImage ?radius? ?sigma?
MagickSharpenImage
MagickSharpenImage
  • double radius,sigma (default: radius=0.0, sigma=1.0)
wandName shave x y
wandName ShaveImage x y
MagickShaveImage
MagickShaveImage
  • int x,y
wandName shear background xShear ?yShear?
wandName ShearImage background xShear ?yShear?
MagickShearImage
MagickShearImage
  • PixelWand borderPixel
  • double xShear, yShear (default: yShear=xShear)
wandName solarize ?threshold?
wandName SolarizeImage ?threshold?
MagickSolarizeImage
MagickSolarizeImage
  • double threshold (default=0.0)
wandName spread ?radius?
wandName SpreadImage ?radius?
MagickSpreadImage
MagickSpreadImage
  • double radius (default=0.0)
wandName stegano watermark ?offset? ?newName?
wandName SteganoImage watermark ?offset? ?newName?
MagickSteganoImage
MagickSteganoImage
  • MagickWand watermark
  • int offset (default=0)
  • string newName
wandName stereo anotherWand ?newName?
wandName StereoImage anotherWand ?newName?
MagickStereoImage
MagickStereoImage
  • MagickWand anotherWand
  • string newName
wandName strip
wandName StripImage
MagickStripImage
MagickStripImage
  • <none>
wandName swirl ?degrees?
wandName SwirlImage ?degrees?
MagickSwirlImage
MagickSwirlImage
  • double degrees (default=0.0)
wandName texture textWand ?newName?
wandName TextureImage textWand ?newName?
MagickTextureImage
MagickTextureImage
  • MagickWand textWand
  • string newName
wandName threshold threshold
wandName ThresholdImage threshold
MagickThresholdImage
MagickThresholdImage
  • double threshold
wandName thresholdchannel channelType threshold
wandName ThresholdImageChannel channelType threshold
MagickThresholdImageChannel
MagickThresholdImageChannel
  • string channelType = "undefined", "red", "cyan", "green", "magenta", "blue", "yellow, "opacity, "black, "matte", "index"
  • double threshold
wandName tint tintPixel opacityPixel
wandName TintImage tintPixel opacityPixel
MagickTintImage
MagickTintImage
  • PixelWand tintPixel, opacityPixel
wandName transform crop geometry ?newName?
wandName TransformImage crop geometry ?newName?
MagickTransformImage
MagickTransformImage
  • string crop, geometry
  • string newName
wandName transparent targetPix ?opacity? ?fuzz?
wandName TransparentImage targetPix ?opacity? ?fuzz?
MagickTransparentImage
MagickTransparentImage
  • PixelWand targetPix
  • int opacity (default=0)
  • double fuzz (default=0.0)
wandName trim ?fuzz?
wandName TrimImage ?fuzz?
MagickTrimImage
MagickTrimImage
  • double fuzz (default=0.0)
wandName unsharpmask ?radius? ?sigma? ?amount? ?threshold?
wandName UnsharpMaskImage ?radius? ?sigma? ?amount? ?threshold?
MagickUnsharpMaskImage
MagickUnsharpMaskImage
  • double radius,sigma,amount,threshold
    (default: radius=0.0,sigma=1.0,amount=0.0,threshold=0.0)
wandName wave amplitude wavelength
wandName WaveImage amplitude wavelength
MagickWaveImage
MagickWaveImage
  • double amplitude,wavelength
wandName whitethreshold thresholdPixel
wandName WhiteThresholdImage thresholdPixel
MagickWhiteThresholdImage
MagickWhiteThresholdImage
  • PixelWand thresholdPixel
wandName write filename
wandName WriteImage filename
wandName WriteImages filename ?adjoin?

MagickWriteImage
MagickWriteImage
MagickWriteImages

  • string filename
  • bool adjoin (default=no)

 

Not implemented MagickWand API's
Comment
MagickAnimateImages
Image display, depends on X
MagickDisplayImage
Image display, depends on X
MagickDisplayImages
Image display, depends on X
MagickGetImageHistogram
Creates & Returns array of PixelWand objects, how to implement ???
MagickReadImageFile
Could be implemented via TclChannel
MagickWriteImageFile
Could be implemented via TclChannel

PixelWand object subcommands

pixelName subcmd ?args?
ImageMagick API
pixelName set ?-quant? color val color val ...
pixelName get ?-quant? color color ...
PixelSetXXX
PixelGetXXX
  • color = "black", "blue", "cyan", "green", "magenta", "opacity", "red", "yellow"
pixelName color
pixelName color string
pixelName GetColor
pixelName SetColor string
pixelName GetColorAsString
PixelGetColorAsString
PixelSetColor
PixelGetColorAsString
PixelSetColor
PixelGetColorAsString
  • string string
pixelName GetBlack
pixelName GetBlackQuantum
pixelName SetBlack val
pixelName SetBlackQuantum val
PixelGetBlack
PixelGetBlackQuantum
PixelSetBlack
PixelSetBlackQuantum
  • double value
pixelName GetBlue
pixelName GetBlueQuantum
pixelName SetBlue val
pixelName SetBlueQuantum val
PixelGetBlue
PixelGetBlueQuantum
PixelSetBlue
PixelSetBlueQuantum
  • double value
pixelName GetCyan
pixelName GetCyanQuantum
pixelName SetCyan val
pixelName SetCyanQuantum val
PixelGetCyan
PixelGetCyanQuantum
PixelSetCyan
PixelSetCyanQuantum
  • double value
pixelName GetGreen
pixelName GetGreenQuantum
pixelName SetGreen val
pixelName SetGreenQuantum val
PixelGetGreen
PixelGetGreenQuantum
PixelSetGreen
PixelSetGreenQuantum
  • double value
pixelName GetMagenta
pixelName GetMagentaQuantum
pixelName SetMagenta val
pixelName SetMagentaQuantum val
PixelGetMagenta
PixelGetMagentaQuantum
PixelSetMagenta
PixelSetMagentaQuantum
  • double value
pixelName GetOpacity
pixelName GetOpacityQuantum
pixelName SetOpacity val
pixelName SetOpacityQuantum val
PixelGetOpacity
PixelGetOpacityQuantum
PixelSetOpacity
PixelSetOpacityQuantum
  • double value
pixelName GetRed
pixelName GetRedQuantum
pixelName SetRed val
pixelName SetRedQuantum val
PixelGetRed
PixelGetRedQuantum
PixelSetRed
PixelSetRedQuantum
  • double value
pixelName GetYellow
pixelName GetYellowQuantum
pixelName SetYellow val
pixelName SetYellowQuantum val
PixelGetYellow
PixelGetYellowQuantum
PixelSetYellow
PixelSetYellowQuantum
  • double value
pixelName colorcount ?cnt?
pixelName GetColorCount
pixelName SetColorCount ?cnt?

PixelGet/SetColorCount
PixelGetColorCount
PixelSetColorCount

  • unsigned cnt

DrawingWand object subcommands

drawName subcmd ?args?
ImageMagick API

drawName affine sx rx ry sy tx ty
drawName Affine sx rx ry sy tx ty

DrawAffine
DrawAffine
  • double sx, rx, ry, sy, tx, ty

drawName annotation x y text
drawName Annotation x y text

DrawAnnotation
DrawAnnotation
  • double x, y
  • string text

drawName arc sx sy ex ey sd ed
drawName Arc sx sy ex ey sd ed

DrawArc
DrawArc
  • double arc, sx, sy, ex. ey. sd, ed

drawName bezier x y x y ...
drawName Bezier x y x y ...

DrawBezier
DrawBezier
  • double x, y

drawName circle ox oy px py
drawName Circle ox oy px py

DrawCircle
DrawCircle
  • double oy, oy, px, py

drawName clippath ?name?
drawName GetClipPath
drawName SetClipPath name

DrawGet/SetClipPath
DrawGetClipPath
DrawSetClipPath
  • string name

drawName cliprule ?rule?
drawName GetClipRule
drawName SetClipRule rule

DrawGet/SetClipRule
DrawGetClipRule
DrawSetClipRule
  • rule = "undefined", "evenodd", "nonzero"

drawName clipunits ?unit?
drawName GetClipUnits
drawName SetClipUnits unit

DrawGet/SetClipUnits
DrawGetClipUnits
DrawSetClipUnits
  • units = "userspace", "userspaceonuse", "objectboundingbox"

drawName color x y paintMethod
drawName Color x y paintMethod

DrawColor
DrawColor
  • double x, y
  • paintMethod = "point", "replace", "floodfill", "filltoborder", "reset"

drawName comment text
drawName comment text

DrawComment
DrawComment
  • string text

drawName ellipse ox oy rx ry start end
drawName Ellipse ox oy rx ry start end

DrawEllipse
DrawEllipse
  • double ox, oy, rx, ry, start, end

drawName fillcolor ?pixelName?
drawName GetFillColor
drawName SetFillColor pixelName

DrawGet/SetFillColor
DrawGetFillColor
DrawSetFillColor
  • string pixelName

drawName fillopacity ?value?
drawName GetFillOpacity
drawName SetFillOpacity value

DrawGet/SetFillOpacity
DrawGetFillOpacity
DrawSetFillOpacity
  • double value
drawName fillpatternurl url
drawName SetFillPatternURL url
DrawSetFillPatternURL
DrawSetFillPatternURL
  • string url (e.g. "#pattern_id" from [push pattern])
 

drawName fillrule ?rule?
drawName GetFillRule
drawName SetFillRule rule

DrawGet/SetFillRule
DrawGetFillRule
DrawSetFillRule
  • rule = "undefined", "evenodd", "nonzero"

drawName font ?fontname?
drawName GetFont
drawName SetFont fontname

DrawGet/SetFont
DrawGetFont
DrawSetFont
  • string fontname

drawName fontfamily ?name?
drawName GetFontFamily
drawName SetFontFamily name

DrawGet/SetFontFamily
DrawGetFontFamily
DrawSetFontFamily
  • string name

drawName fontsize ?value?
drawName GetFontSize
drawName SetFontSize value

DrawGet/SetFontSize
DrawGetFontSize
DrawSetFontSize
  • double value

drawName fontstretch ?stretchType?
drawName GetFontStretch
drawName SetFontStretch stretchType

DrawGet/SetFontStretch
DrawGetFontStretch
DrawSetFontStretch
  • stretchType = "normal", "ultracondensed", "extracondensed", "condensed", "semicondensed", "semiexpanded", "expanded", "extraexpanded", "ultraexpanded", "any"

drawName fontstyle ?style?
drawName GetFontStyle
drawName SetFontStyle style

DrawGet/SetFontStyle
DrawGetFontStyle
DrawSetFontStyle
  • style = "normal", "italic", "oblique", "any"

drawName fontweight ?value?
drawName GetFontWeight
drawName SetFontWeight value

DrawGet/SetFontWeight
DrawGetFontWeight
DrawSetFontWeight
  • unsigned value

drawName gravity ?gravityType
drawName GetGravity
drawName SetGravity gravityType

DrawGet/SetGravity
DrawGetGravity
DrawSetGravity
  • gravityType = "forget", "northwest", "north", "northeast", "west", "center", "east", "southwest", "south", "southeast", "static"

drawName line sx sy ex ey
drawName Line sx sy ex ey

DrawLine
DrawLine
  • double sx, sy, ex, ey

drawName matte x y paintMethod
drawName Matte x y paintMethod

DrawMatte
DrawMatte
  • double x,y
  • paintMethod = "point", "replace", "floodfill", "filltoborder", "reset"

drawName point x y
drawName Point x y

DrawPoint
DrawPoint
  • double x, y

drawName polygon x y x y ...
drawName Polygon x y x y ...

DrawPolygon
DrawPolygon
  • double x, y

drawName polyline x y x y ...
drawName Polyline x y x y ...

DrawPolyline
DrawPolyline
  • double x, y

drawName path opt|cmd ?args? opt|cmd ?args? ...

DrawPathXXX
  • opt ?args? =
    -relative bool (Switch relative/absolute mode)
    -smooth bool (Smooth bezier, x1,y1 taken from previous curve)
    -scale double (Scale all positions by a factor)
 
  • cmd ?args? =
    # "comment in a single argument"
    start
    finish
    close
    move x y
    line x y
    horizontal x
    vertical y
    -smooth 0 quadratic x1 y1 x y
    -smooth 1 quadratic x y
    -smooth 0 cubic x1 y1 x2 y2 x y
    -smooth 1 cubic x2 y2 x y
    elliptic rx ry rotation large sweep x y


DrawPathStart
DrawPathFinish
DrawPathClose
DrawPathMoveToAbs/Rel
DrawPathLineLineToAbs/Rel
DrawPathLineLineToHorizontalAbs/Rel
DrawPathLineLineToVerticalAbs/Rel
DrawPathCurveToQuadraticBezierAbs/Rel
DrawPathCurveToQuadraticBezierSmoothAbs/Rel
DrawPathCurveToAbs/Rel
DrawPathCurveToSmoothAbs/Rel
DrawPathEllipticArcAbs/Rel
  • double x, y, rx, ry , rotation
  • int large, sweep

drawName path cmdList

  • If 'drawName path' is called with a single argument then it's intepreted
    as a list of path options", "commands with its arguments.

drawName push what ?args?
drawName pop what

DrawPushXXX
DrawPopXXX
  • what = "clippath ", " defs ", "graphiccontext", "pattern"
  • args = see below

drawName PushClipPath id
drawName PopClipPath
drawName PushDefs
drawName PopDefs
drawName PushGraphicContext
drawName PopGraphicContext
drawName PushPattern id x y width height
drawName PopPattern

DrawPushClipPath
DrawPopClipPath
DrawPushDefs
DrawPopDefs
DrawPushGraphicContext
DrawPopGraphicContext
DrawPushPattern
DrawPopPattern
  • string id
  • double x, y, width, height

drawName rectangle x1 y1 x2 y2
drawName Rectangle x1 y1 x2 y2

DrawRectangle
DrawRectangle
  • double x1, y1, x2, y2

drawName render
drawName Render

DrawRender
DrawRender
  • <none>

drawName rotate degrees
drawName Rotate degrees

DrawRotate
DrawRotate
  • double degrees

drawName round x1 y1 x2 y2 rx ry
drawName RoundRectangle x1 y1 x2 y2 rx ry

DrawRoundRectangle
DrawRoundRectangle
  • double x1, y1, x2, y2, rx, ry

drawName scale x ?y?
drawName Scale x ?y?

DrawScale
DrawScale
  • double x, y (default: y=x)

drawName skewx degrees
drawName SkewX degrees
drawName skewy degrees
drawName SkewY degrees

DrawSkewX
DrawSkewX
DrawSkewY
DrawSkewY
  • double degrees

drawName strokecolor ?pixelName?
drawName GetStrokeColor
drawName SetStrokeColor pixelName

DrawGet/SetStrokeColor
DrawGetStrokeColor
DrawSetStrokeColor
  • string pixelName

drawName strokeantialias ?flag?
drawName GetStrokeAntialias
drawName SetStrokeAntialias flag

DrawGet/SetStrokeAntialias
DrawGetStrokeAntialias
DrawSetStrokeAntialias
  • int flag

drawName strokedasharray
drawName strokedasharray {}
drawName strokedasharray val val ...
drawName GetStrokeDasharray
drawName SetStrokeDashArray
drawName SetStrokeDashArray val val ...

DrawGetStrokeDashArray
DrawSetStrokeDashArray
DrawSetStrokeDashArray
DrawGetStrokeDashArray
DrawSetStrokeDashArray
DrawSetStrokeDashArray
  • double val

drawName strokedashoffset ?val?
drawName GetStrokeDashOffset
drawName SetStrokeDashOffset val

DrawGet/SetStrokeDashOffset
DrawGetStrokeDashOffset
DrawSetStrokeDashOffset
  • double val

drawName strokelinecap ?linecapType?
drawName GetStrokeLineCap
drawName SetStrokeLineCap linecapType

DrawGet/SetStrokeLineCap
DrawGetStrokeLineCap
DrawSetStrokeLineCap
  • linecapType = "undefined", "butt", "round", "square"

drawName strokelinejoin ?linejoinType?
drawName GetStrokeLineJoin
drawName SetStrokeLineJoin linejoinType

DrawGet/SetStrokeLineJoin
DrawGetStrokeLineJoin
DrawSetStrokeLineJoin
  • linejoinType = "undefined", "miter", "round", "bevel"

drawName strokemiterlimit ?val?
drawName GetStrokeMiterLimit
drawName SetStrokeMiterLimit val

DrawGet/SetStrokeMiterLimit
DrawGetStrokeMiterLimit
DrawSetStrokeMiterLimit
  • unsigned val

drawName strokeopacity ?val?
drawName GetStrokeOpacity
drawName SetStrokeOpacity val

DrawGet/SetStrokeOpacity
DrawGetStrokeOpacity
DrawSetStrokeOpacity
  • double val
drawName strokepatternurl url
drawName SetStrokePatternURL url
DrawSetStrokePatternURL
DrawSetStrokePatternURL
  • string url (e.g. "#pattern_id" from [push pattern])
 

drawName strokewidth ?val?
drawName GetStrokeWidth
drawName SetStrokeWidth val

DrawGet/SetStrokeWidth
DrawGetStrokeWidth
DrawSetStrokeWidth
  • double val

drawName textantialias ?flag?
drawName GetTextAntialias
drawName SetTextAntialias flag

DrawGet/SetTextAntialias
DrawGetTextAntialias
DrawSetTextAntialias
  • int flag

drawName textdecoration ?decorationType?
drawName GeTextDecoration
drawName SetTextDecoration decorationType

DrawGet/SetTextDecoration
DrawGetTextDecoration
DrawSetTextDecoration
  • string decorationType = "none", "underline", "overline", "linethrough"

drawName textencoding ?string
drawName GetTextEncoding
drawName SetTextEncoding string

DrawGet/SetTextEncoding
DrawGetTextEncoding
DrawSetTextEncoding
  • string string

drawName textundercolor ?pixelName?
drawName GetTextUnderColor
drawName SetTextUnderColor pixelName

DrawGet/SetTextUnderColor
DrawGetTextUnderColor
DrawSetTextUnderColor
  • string pixelName

drawName translate x y
drawName Translate x y

DrawTranslate
DrawTranslate
  • double x, y

drawName viewbox x1 y1 x2 y2
drawName SetViewbox x1 y1 x2 y2

DrawSetViewbox
DrawSetViewbox
  • unsigned x1, y1, x2, y2

 

Not implemented MagickWand API's
Comment
DrawAllocateWand
For legacy application only, outside Wand-API
DrawComposite
For legacy application only, outside Wand-API
DrawSetStopColor
???

 


Copyright 2004 Rolf Schrödter and David N. Welton