Re: Creating an image from data



Andreas Schiffler wrote:

> I am trying to figure out how to create an image widget that can be
> embedded in a popup window. 
> 
> I am starting from a 32bit RGBA data array (which is in fact a 32bit
> SDL_surface's pixel data).


Hi Andreas, is this gtk 1.2? As far as I know, the easiest way is to 
make a gtk_drawing_area(), and then use gdk_draw_rgb_image() to repaint 
the area from the expose signal. This is only a few lines of code.

I believe gtk 2 has a much fancier system ... but I've not used it.

John



========================================================== 
Renaissance Autumn at the National Gallery 
A season of exhibitions, displays and events with a Renaissance theme. 

Pisanello: Painter to the Renaissance Court (24 October - 13 January 2002) 

For information and tickets: 
http://www.nationalgallery.org.uk/what/news/ren_autumn.htm



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