From: "Ara.T.Howard" Date: 2004-02-22T02:44:51+09:00 Subject: TkPhotoImage :data=>buf does anyone know if this is simply a limitation of the gif formatted images? irb(main):001:0> TkPhotoImage.new :file=>'images/Back.gif' => # irb(main):002:0> (data=IO.read 'images/Back.gif').size => 985 irb(main):003:0> TkPhotoImage.new :data=>data RuntimeError: couldn't recognize image data from /dmsp/reference/lib/ruby/1.8/tk.rb:1623:in `__invoke' from /dmsp/reference/lib/ruby/1.8/tk.rb:1623:in `_invoke' from /dmsp/reference/lib/ruby/1.8/tk.rb:1027:in `tk_call' from /dmsp/reference/lib/ruby/1.8/tkcanvas.rb:883:in `initialize' from /dmsp/reference/lib/ruby/1.8/tkcanvas.rb:926:in `initialize' from (irb):11:in `new' from (irb):11 from :0 am i limited to bitmaps for this or should other types of images be able to be loaded this way? what i'm trying to do is something like .... back_img = TkPhotoImage.new :data=>back_gif BEGIN { back_gif = '2158asdfanajk350w9ae8asdf....' } .... in otherwords i want to inline all my icon images in the script. i can do this by inlining them, writing out a tempfile, and using that tempfile - but would like to avoid the extra step... any suggestions welcome - i'm terrible with tk and have two days to whip out this gui... -a -- =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328 | URL :: http://www.ngdc.noaa.gov/stp/ | TRY :: for l in ruby perl;do $l -e "print \"\x3a\x2d\x29\x0a\"";done ===============================================================================