Help with GdkPIxbuf and GtkImage...
- From: Micah Carrick <email micahcarrick com>
- To: gtk-list <gtk-list gnome org>
- Subject: Help with GdkPIxbuf and GtkImage...
- Date: Fri, 23 Dec 2005 18:04:58 -0800
Hi.
I have a GtkImage in my glade file which I am trying to get to display
image data that I have in memory. The data is in raw format, 3 bytes
per pixel RGB. So, this is sort of what I'm trying to do now
(v->image_data is a struct member with the array of guchar containing my
image data)...
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_data( v->image_data,
GDK_COLORSPACE_RGB,
FALSE,
8,
320,
240,
960,
NULL,
NULL );
GtkWidget *image1 = glade_xml_get_widget (gxml, "image1");
gtk_image_set_from_pixbuf(GTK_IMAGE(image1), pixbuf);
gtk_widget_show(image1);
Any pointers as to what I might be doing wrong?
Thanks,
Micah
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]