Posted to tcl by Stu at Wed Aug 27 04:47:19 GMT 2008view raw
- proc readFile {fn} {return [read [set f [open $fn]]][close $f]}
- image create photo plop -width 400 -height 400
- pack [label .l -image plop]
- set fn [lindex $argv 0]
- set w 300
- set x 0
- set y 0
- set b 10
- foreach {c1 c2 c3} [split [readFile $fn] ""] {
- if {$c1 eq {}} {set c1 \a}
- if {$c2 eq {}} {set c2 \a}
- if {$c3 eq {}} {set c3 \a}
- plop put #[format %02x%02x%02x [scan $c1 %c] [scan $c2 %c] [scan $c3 %c]] -to $x $y [expr {$$
- if {[incr x $b] < $w} { continue }
- set x 0
- incr y $b
- }
Comments
Posted by patthoyts at Wed Aug 27 13:41:22 GMT 2008 [text] [code]
testing