Updated 2013-08-18 19:46:42 by uniquename

Keith Vetter 20050105 : After writing Spotlight, I realized that it would be trivial to modify it to become a magnifying glass instead.

Unlike Spotlight, this affect is much less dependent on your computer power since it can leverage built in image scaling.

Again, I've included an image for demo purposes but you can easily insert your own image by editing the script and changing what ::img::img is.

See also A little magnifying glass.

JH The treectrl package has a loupe command hidden in it that works as a C-based x-platform magnifying glass. You can see this used in tklib's widget::(screen)ruler widgets.

uniquename 2013aug18

For those readers who do not have the time/facilities/whatever to setup the code below and execute it, here are a couple of images that indicate what the following code can do.

I do not have the 'Img' extension package on my computer (and have no intention of ever installing it). The sample data that Vetter provided in the code below requires the 'Img' extension.

I changed the code a little to use the earthris.gif file of the Tk demo directory (/usr/share/doc/tk8.5/examples/images/ on most Linux installations). I simply changed the 'image create photo' statement to use '-file' instead of '-data'. And I commented out the 'package require Img' statement.

The image on the left is how the GUI looks when you first bring it up on the 'earth rising over the horizon of the moon' image. For the image on the right, I moved the zoom scale to 8, and then moved the mouse-cursor over the 'blue marble' portion of the image.

The little bulge on the right side of the magnified image corresponds to Vetter's comment in the code below --- namely:
    # Bug here when xy extends past edge of image. Too lazy to fix it.

 ##+##########################################################################
 #
 # Magnify.tcl -- Aims a magnifying glass at an image
 # by Keith Vetter, January 2006
 #
 
 package require Tk
 package require Img
 
 set S(sz) 120                                    ;# Size of magnifying square
 set S(sz2) [expr {$S(sz)/2}]
 set S(zoom) 2
 set S(zsize) [expr {$S(sz)/2/$S(zoom)}]
 
 proc DoDisplay {} {
    global S
    
    wm title . "Magnifying Glass"
    canvas .c -width $S(w) -height $S(h) -highlightthickness 0
    .c create image 0 0 -image ::img::img -anchor nw
    .c create image 0 0 -image ::img::small -anchor c -tag small
    
    frame .buttons -bd 2 -relief ridge
    scale .zoom -label "Zoom" -from 2 -to 8 -showvalue 0 \
        -variable S(zoom) -orient h -command FMove -relief raised
    .zoom configure  -font "[font actual [.zoom cget -font]] -weight bold"
    option add *font [.zoom cget -font]
    button .about -text "About" -command About
    pack .c .buttons -side top -fill both -expand 1
    pack .zoom .about -side left -expand 1 -in .buttons
    .c create rect -100 -100 -100 -100 -tag box -fill {} -outline black -width 2
    
    bind .c <Motion> [list MMove %x %y]
    bind .c <Leave> [list MLeave]
    update
    MLeave
 }
 proc MLeave {} {
    .c coords box -100 -100 -100 -100
    .c coords small -1000 -1000
 }
 proc MMove {x y} {
    global S
    
    .c coords small $x $y
    
    set xy [list [expr {$x-$S(sz2)}] [expr {$y-$S(sz2)}] \
                [expr {$x+$S(sz2)}] [expr {$y+$S(sz2)}]]
    .c coords box $xy
    
    # Bug here when xy extends past edge of image. Too lazy to fix it.
    set xy [list [expr {$x-$S(zsize)}] [expr {$y-$S(zsize)}] \
                [expr {$x+$S(zsize)}] [expr {$y+$S(zsize)}]]
    catch {
        eval ::img::small copy ::img::img -from $xy -zoom $S(zoom) $S(zoom)
    }
 }
 proc FMove {args} {
    set ::S(zsize) [expr {$::S(sz)/2/$::S(zoom)}]
    .zoom config -label "Zoom: $::S(zoom)"
    
    foreach var {x y} val [.c coords small] {
        set $var [expr {int($val)}]
    }
    MMove $x $y
 }
 
 proc About {} {
    set msg "Magnifying Glass\nby Keith Vetter, January 2006"
    tk_messageBox -message $msg
 }
 ################################################################
 
 set idata {
    /9j/4AAQSkZJRgABAQEASABIAAD//gAmRmlsZSB3cml0dGVuIGJ5IEFkb2JlIFBob3Rvc2hvcKgg
    NS4y/9sAQwAcExUYFREcGBYYHx0cISlFLSkmJilUPEAyRWRYaWdiWGBfbnyehm51lndfYIq7i5aj
    qbGzsWuEwtDBrM6errGq/9sAQwEdHx8pJClRLS1RqnJgcqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
    qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq/8AAEQgBUgHCAwEiAAIRAQMRAf/EABkAAQEBAQEB
    AAAAAAAAAAAAAAABAgMEBf/EADkQAAICAQIEBAQEBgICAgMAAAABAhEhEjEDQVFhInGBkQQTMqEU
    QlKxI2LB0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z9QABeRQAgQAKstyLYAA9yLl
    5gFQ5s1zQBFYe5fyxAAgACNR39RLcAKj+pj8wBUXkRgAPy+pprxegBFZlyJ1AAP6S8gAJzL0ACHI
    LZgAZf10WOdwCjMm1KrKtgBofl9DK2YAHo4SX4aUqV6lnmdJZmm8t0AawZAAV//Z}
 
 ################################################################
 
 image create photo ::img::img -data $idata
 image create photo ::img::small -width $S(sz) -height $S(sz)
 set S(w) [image width ::img::img]
 set S(h) [image height ::img::img]
 DoDisplay
 return