Updated 2018-02-08 21:55:13 by escargo

Image handling and transformation from Tcl (Tk not required). Part of the eTcl distribution for Win32, Linux and Windows Mobile (aka PocketPC). Will be soon available as stub-enabled extension for Win32 and Linux/x86.

http://www.evolane.com/software/pixane/index.html (MHo: deadlink as of 2018/02/08)

An Internet Archive link to a version from April, 2012 (escargo):

https://web.archive.org/web/20120403094533/http://www.evolane.com:80/software/pixane/index.html

RS 2006-02-03 - Example code: display an image file (JPEG or others, what Tk itself has not built-in) in the eTcl console:

#-- Convert a "pixane" image to a Tk photo
 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.