[Code previously here has moved to Writing PPM files.]
A pure Tcl PNG Reader/Writer would be a great solution for adding PNG support to the core and avoid libpng dependency (which tkimg does).
tomk - see Write PNG File (without using Tk)
See also PNG.