[gtkmm] Indexed image on Gdk::Pixbuf



I'm trying to put an indexed image into a Gdk::Pixbuf.
I have the image as a buffer in memory of 8 bits per color with the palette
also in memory on another buffer of 3 bytes per color (256 colors).
The problem is : How do I put this image into a Gdk::Pixbuf without converting it
to a 24 or 32 bits format?
If I do the conversion I waste a lot of time.

If it is imposible to put directly a 8 bits indexed image into a pixbuf , can I put the image to a Gtk::Image or Gdk::Image in 8 bits and then transfer it to the Gdk::Pixbuf?
How?

The functions from Gdk::Pixbuf to get an image from a file don't suits me because
I'm using an encrypted image that I have to decryp before putting it on the
Gdk::Pixbuf.

I've try to use Gdk::Drawable->draw_indexed_image but I haven't been able to
make it work.
Can anybody put a simple working example of Gdk::Drawable->draw_indexed_image? I haven't found any example on the net.

Thanks in advance

_________________________________________________________________
Reserva y planifica tu viaje online. http://www.msn.es/Viajes/




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