On Thu, 24 May 2001, John Kaurin wrote:
> | MS Paint creates a "Windows Bitmap" which is a different file format.  The
> | bitmaps in the Tk demos are XBM (X11/X10 bitmap) files.  Most of the more
> | advanced graphics suites should be able to work with them.  Thanks for
> | pointing out this gotcha, I'll add a note in the README.
> Is there a list of supported graphics formats for Ruby Tk? I was unable to
> find one in my searches. I could only get GIF files to work, not even PNG
> files were acceptable. Thanks.

I think it is:

	* XBM (indexed 1 bpp)
	* GIF (indexed 1-8 bpp)
	* PPM (rgb 24 bpp, 48 bpp, ...)

So if you want to display a PNG image you can either:

	* convert it to GIF beforehand
		- PNG must be indexed, or else color loss
		- re-encoding overhead (can be lowered)

	* convert it to PPM beforehand
		- PNG transparency info is lost
		- the whole uncompressed image passes through a pipe

You can use an external program like "pngtoppm" (NetPBM) or "convert" 
(ImageMagick). About the pipe: I was able to stream video in PPM format
from a C++ program to a Tcl/Tk program (on Solaris,Linux), so it should be
feasible with Ruby/Tk too.

matju