scaling pixbufs

I'm writing a gtk (2.0.2) application that renders a pixbuf in a
drawingarea, and I'd like the user to be able to "zoom" in and out of the
pixbuf.  I've gotten this to work quite well using
gdk_pixbuf_scale_simple, but the pixbuf is large (3000x3000 pixels), and
zooming in by much more than 2x, as you might guess, causes all kinds of
memory and swapping troubles.  Is there a way to leave the pixbuf as is,
and simply alter the pixel ratio of the drawing_area (i.e. a 5x5 pixel on
the drawing_area corresponds to a 1x1 pixel from the pixbuf)?  One thing
that may help is the original image loaded in the pixbuf is grayscale, but
my understanding is that pixbufs can only be in RGB colorspace (so my
image takes three times the amount of required memory) - is there any
support for grayscale pixbufs in a development release of gtk+?

Pardons if this question has already been dealt with before...

	Tim F

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