From: Dave Thomas Date: 2001-03-10T04:30:47+09:00 Subject: [ruby-talk:12354] Re: Can Ruby-GTK display Gif Png or Jpeg files? Phlip writes: > Ruby-san: > > My mom got my kid a NickClick Mattel toy digital camera - it comes with a > goofy image program over-written for Windows 98. > > I only have Linux computers in my life. > > I found a program on the 'net that reads the camera's dinky protocol and > writes JPG and other formats. I want to script a program that displays all > these pictures in windows, with a button saying "Acquire". > > Because this looked too easy in an older language, I decided to make it > harder by using this project to learn Ruby. > > But not so hard I have to learn the guts of JPEG. > > How do I read a file containing a common graphics and display it on a GTK > (or Tk) window? There's some basic code from the book that does this with Tk at http://www.pragmaticprogrammer.com/ruby/samples/smp161.html this might be a start. I've never used a TkPhotoImage with a .jpg though, so I'm not sure if the support if there. You may have to use gifs if not. Regards Dave