From: "Guerry A. Semones" Date: 2001-03-10T04:22:59+09:00 Subject: [ruby-talk:12352] Re: Can Ruby-GTK display Gif Png or Jpeg files? > 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? The TkPhotoImage can support GIF, but not JPG. It does support some other formats, but apparently not JPG. The "Programming Ruby" book has a Tk example on page 161.... Hope that helps, Guerry -- G. Semones, gsemones@treenleaf.com, http://www.treenleaf.com Code Ruby (http://www.ruby-lang.org) Ride the Cluetrain (http://www.cluetrain.com) "That's the spirit! Forward Momentum." -- Miles Vorkosigan