[[Explain motivation (cron, possible sneer at Java, portability, ...]] [LV] Can someone go into the technical details of what parts of Tk require a display and what parts do not? For instance, if one were to write a C app which created a [canvas], placed things onto the canvas, configured various colors, text, etc., then commanded the canvas to create [PostScript], would a display be necessary for any of this? According to [Robert Heller] in a [comp.lang.tcl] posting, the canvas postscript generating code uses various bits and pieces of Xlib, relating to things like colors, fonts, and conversions of 'image' type data to something that can be converted to postscript. ---- [[Explain alternatives: * utility X server * Xvfb [http://www.itworld.com/AppDev/1461/UIR000330xvfb/] * [VNC] * TclDG [http://www.usenix.org/publications/library/proceedings/tcl96/full_papers/ellson/] * Image [http://pages.infinit.net/cclients/] * Xbit [http://www.geocities.com/SiliconValley/Hills/5586/home.html] * [gdtclft] * [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 ---- A small and incomplete TGA image reader which reads a file into a format that can then later be fairly easily manipulated without the requirement of Tk. The format is compatible with one of the accepted (albeit undocumented) formats for Tk photos. See: [TGA image reader]. ---- See also "[strimj - string image routines]" and "[barchart]". [GIF] has code snippets for writing image files in pure Tcl. ---- [[Do something about Tk's "-nodisplay" ...] ---- [Arts and crafts of Tcl-Tk programming] - [Category Graphics]