no display name and no $DISPLAY environment variable
    while executing
"load /enadisk/commun/linux/local/ActiveTcl-8.6.11/lib/libtk8.6.so Tk"
    ("package ifneeded Tk 8.6.11" script)
    invoked from within
"load /commun/linux/local/ActiveTcl-8.6.11/lib/Img1.4.6/libtkimgwindow1.4.6.so"
    ("package ifneeded img::window 1.4.6" script)
    invoked from within
"package require img::window"
    ("package ifneeded Img 1.4.6" script)
    invoked from within
"package require Img"
    (in namespace eval "::request" script line 3)
    invoked from within
"namespace eval ::request $script"
    ("::try" body line 12)

OUTPUT BUFFER:

#!/usr/local/ActiveTcl/bin/wish package require Img set Wdt 600 set Hgt 300 set img1 [image create photo] $img1 blank set img2 [image create photo] $img2 blank set d 30 set f 80 set ok 1 while { $ok } { set d [expr {$d+100}] set f [expr {$d+50}] if {$f >= $Wdt} { set f [expr {$Wdt-1}] set ok 0 } lappend Lim [list $d $f] } set ColStock [list red green blue yellow magenta cyan black grey] proc faitimg1 {img1} { global ColStock global Wdt Hgt Lim for {set y 0} {$y < $Hgt} {incr y} { set h $y set b [expr {$y+1}] set c 0 foreach e $Lim { foreach {d f} $e {} set col [lindex $ColStock $c] $img1 put $col -to $d $h $f $b incr c } } return } proc faitimg2 {img2} { global ColStock global Wdt Hgt Lim for {set y 0} {$y < $Hgt} {incr y} { set Data "" set c 0 set xi 0 foreach e $Lim { foreach {d f} $e {} set col [lindex $ColStock $c] set rep [expr {$d-$xi}] append Data [string repeat " white" $rep] set rep [expr {$f-$d}] append Data [string repeat " $col" $rep] set xi $f incr c } set rep [expr {$Wdt-$f}] append Data " white" lappend LData [string trim $Data] } $img2 put $LData return } puts "[time {faitimg1 $img1} ]" puts "[time {faitimg2 $img2} ]" exit