need raster image examples

I need to find a way to efficiently display a small subsection of a
very large (50 megapixel or more) 8-bit graymap.  I certainly don't
want to use some primitive that tries to make a 32-bit rgb value for
each source pixel only to throw away all but the 1 or 2 megapixels
that I actually end up displaying.

I've poked around the gtk/gdk docs looking for examples but am getting
all confused by the opaque data types surrounding pixmaps, pixbufs,
images etc.  Is there already a primitive that takes a subsection of a
raster image in 8bpp and displays it on a 32bpp (or other) window?

Old X11 code such as xv solved this problem nicely by simply writing
to the underlying raster buffers directly.  XV, but the way, will
display one of these images using only 50 megs of memory.

With all the wonderfully opaque data types in gdk I'm not exactly sure
what the heck is going on behind the scenes.  Can someone give me a
clue? ;-)

       Wolfgang Rupprecht <wolfgang+gnus dailyplanet wsrcc com>

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