Version 11 of Image manipulation without Tk

Updated 2002-11-14 14:04:08

[Explain motivation (cron, possible sneer at Java, portability, ...]


[Explain alternatives:

  • utility X server
  • Xvfb [L1 ]
  • VNC
  • TclDG [L2 ]
  • Image [L3 ]
  • Xbit [L4 ]
  • xwd
  • Pure Tcl solutions. An example DKF offered is
  #! /usr/local/bin/tclsh8.3
  puts "Content-Type: image/x-portable-graymap"
  puts ""
  puts "P2"                          ;# ASCII PGM "magic number"
  puts "10 10"                       ;# width and height
  puts "18"                          ;# Max grey value
  for {set i 0} {$i<10} {incr i} {
     set line ""
     for {set j 0} {$j<10} {incr j} {
        lappend line [expr {$i+$j}]
     }
     puts $line
  }
  exit

See also "strimj - string image routines" and "barchart". GIF has code snippets for writing image files in pure Tcl.


Arts and crafts of Tcl-Tk programming - Category Graphics