#include #include #include static gdouble total_seconds = 0.0; /* randomly colour each pixel */ static void fill_pixbuf (GdkPixbuf *buf) { int width, height, rowstride, n_channels; int x,y,n; guchar *pixels, *p; g_assert (gdk_pixbuf_get_bits_per_sample (buf) == 8); n_channels = gdk_pixbuf_get_n_channels (buf); width = gdk_pixbuf_get_width (buf); height = gdk_pixbuf_get_height (buf); rowstride = gdk_pixbuf_get_rowstride (buf); pixels = gdk_pixbuf_get_pixels (buf); for (x=0; x