#!/usr/bin/env wishstep
#
# Trivial Image Drop Displayer
#
# Use files or something to drag a gif or bmp file 
# and drop in the sunken box
#

image create photo .i
label .l -image .i
label .da -text "Image Viewer" -bd 2 -relief sunken 
pack .da
pack .l -side bottom -fill both -expand y
bind .da <Drop> {
	. configure -cursor clock
	if {[string match *.gif %D] || [string match *.bmp %D]} {
		image delete .i
		image create photo .i
		.i read %D
	} else {
		puts "Invalid file type"
	}
	. configure -cursor top_left_arrow
}
	
