Version 4 of TclMagick

Updated 2003-12-12 23:44:32

What: TclMagick

 Where: http://www.rolf-schroedter.de/tclMagick/TclMagick.html
        http://www.imagemagick.org/
 Description: Tcl only interface to ImageMagick library.
        Will make use of ImageMagick's Wand-API.
        Provides a one to one mapping of the Wand API - requires no
        Tk to do image manipulation.
        Currently in alpha state.
 Updated: 08/2003
 Contact: See web site

Rolf Schroedter provides this example of the extension:

 # Load the tclMagick module
 #
 load TclMagick.dll

 # Create wand & draw objects
 #
 set wand [magick::wand create]
 set draw [magick::draw create]

 # Load & enlarge a PNG
 #
 $wand ReadImage sample.png
 $wand ResizeImage 500 500 cubic
 # Draw a red "Tcl/Tk" rotated by 45<B0>
 #
 $draw push graph
     $draw SetStrokeWidth 1
     $draw SetStrokeColorString "red"
     $draw SetFillColorString "red"
     $draw SetFontSize 18
     $draw Annotation -97 170 "Tcl/Tk"
 $draw pop graph
 $draw Rotate -45

 $wand DrawImage $draw

 # Write the image in different file formats
 #
 $wand WriteImage sample.jpg
 $wand WriteImage sample.gif
 $wand WriteImage sample.pdf

 # Delete wand & draw objects
 #
 magick::draw delete $draw
 magick::wand delete $wand

This extension is tracking an unstable version of ImageMagick (CVS, basically). I have an updated version for the latest out of CVS that now also compiles on Linux. Hopefully, TclMagick will be included in ImageMagick itself at some point. - davidw


davidw: I am working on making code that will link the Tcl imagemagick code with Tk. Although of course you do not and should not need Tk to use the TclMagick extension! You don't need a display to process images.

... For now it's just going to be a command to transfer preexisting Tk images to preexisting ImageMagick "wand"'s, and vice versa. In the future, I'd like to allow for tighter integration ala Img.


elfring 2003-12-01 Would like to get a canvas to work with the Wand API [L1 ]?


Category Package | Category Graphics