proc piximg file { package req pixane set p [pixane create] pixane load $p -file $file K [pixcopy $p] [pixane delete $p] }#-- Export procs to the console interpreter (see corp and K for details)
console eval [corp piximg] console eval [corp K]#-- The viewer now is similar to see described on console page:
proc see2 file { set im [console eval [list piximg $file]] console eval [list .console image create end -image $im] }RS has tested that pixane 0.3 as came with eTcl 1.0pl6, on PocketPC, works well with the following formats: GIF, PNG (most), JPEG, BMP (uncompressed). So for my purposes, it is quite a good substitute for the Img package, which isn't yet available on PocketPC.EH 2006-03-09 Pixane now registers Tk photo handlers when loaded and Tk is already loaded. It means images in all supported formats (BMP, JPEG, PNG, ...) can be loaded the usual way into Tk photos, that is 'image create photo -file|-data'. Then, pixcopy API is useful only of one want to draw into a pixane image, before displaying it as a Tk photo.
arjen (2 may 2011) Given that Plotchart uses the Img package to store pictures and pixane offers a workaround for the PocketPC (see http://wfr.tcl.tk/1744), I wonder what the best way is to detect that we are running under pixane? Then I can add a command "package require pixane" to the code and there is only one single version of Plotchart required.