On 8/31/07, Jim George <[EMAIL PROTECTED]> wrote: > On 8/30/07, Marco Brambilla <[EMAIL PROTECTED]> wrote: > > Is there a easy way of displaying such an image "as is" (single channel) ? > > Or must I convert it each pixel to > > the a RGB triplet needed by gtk_pixbuf_new_from_data ? > > You could possibly use gdk_image, but it's easier to use a pixbuf and > just copy the grayscale value thrice into R, G and B. Remember to use
Another option (though a little harder) is to make a GtkDrawingArea, connect to the "expose" signal, and use gdk_draw_gray_image() to paint the damaged area from your stored 1-channel image. It ought to be quite a bit faster. John _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list