Re: Displaying ppm's



ANDREW JAMES SHAW wrote:
> I would like to know how to loads the images and display them in their
> corresponding areas. Any help would be greatly appreciated.

Hi Andrew, you've got a lot of choices:

Low level: write your own PPM loader (erm, 50 lines of code?), then use
gdk_draw_rgb_image() to paint it into a GtkDrawingArea widget (another 50
lines?).

Medium level: use the gdk-pixbuf library (do a google search) ... this library
has a whole bunch of image loaders, and a lot of stuff for rendering sections of
loaded images to drawables. You'll be able to do fancy zoom effects and stuff
easily too.

High level: use an image view widget ... there are a few kicking around, they
were discussed here a week or two ago, check the list archive.

HTH, John




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]