Main TclMagick TkMagick SourceForge.net Logo

TkMagick - glue between TclMagick and Tk's Images

TkMagick is a small, simple extension that lets you pass images back and forth between Tk and the TclMagick extension.

It has only two commands:

Example:

proc magickimage {filename} {
    set magimg [magick create wand]
    set tkimg [image create photo]
    $magimg ReadImage $filename
    magicktophoto $magimg $tkimg
    magick delete $magimg
    return $tkimg
}

set poolphoto [magickimage [file join $dirname .. images pool.jpg]]
label .im
.im configure -image $poolphoto
pack .im
bind . <q> exit
    
Copyright 2004 Rolf Schrödter and David N. Welton