quick Qs about pixbuf manipulation



Hi:

I have a couple of quick questions that I hope someone can answer
regarding the most efficient ways to:

* modify a gdk-pixbuf's colormap on-the-fly

* access pixels on-the-fly

I need to grab an image, recolor and/or scale it, and render it back
into a GdkDrawable.  Using gtk_image_get/put_pixel is *waaaay* slow.

Mostly I use gdk_pixbuf_scale () for the rescaling, but sometimes I need
a different scaling algorithm.  

* should I write new gdk_pixbuf scaling algorithms for submission? or
* is there a better way to access the pixbuf internals?

As for recoloring it, seems like replacing the colormap before rendering
the image would do the trick, but I can't seem to find the right API.

Thanks in advance, apologies for posting a mostly "how-do-I" type of
question to *dev.

Bill





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