From: jcb@... (MetalOne) Date: 2003-05-13T08:48:13+09:00 Subject: Ruby/Tk how to display a raw image residing in RAM. I have an image stored as an array of RGB tuples. 8 bits for each of red, green, and blue. I would like to use Tk to display it. I am completely clueless. I have looked at the Tk documentation and found the following functions: Tk_PhotoBlank Tk_PhotoExpand Tk_PhotoGetImage Tk_PhotoGetSize Tk_PhotoPutBlock Tk_PhotoPutZoomedBlock Tk_PhotoPhotoSetSize The Tk documentation is limited with no examples, so I don't know how to do it in Tcl/Tk. I can't figure out the Ruby bindings either. It appears that there is simply TkPhotoImage I found a nice example using TkPhotoImage to load from file: image = TkPhotoImage.new() { file "javaguy.gif" } label = TkLabel.new(root) { image image; height 50 }.pack("anchor"=>"e") I looked at the Ruby/Tk bindings source code for a while. I couldn't figure out how the file() function was mapped, much less the other functions. Any help here would be appreciated.