I have a buffer of pixel values. Is it possible to display that buffer as an image us开发者_如何学JAVAing pixbuf in gtk. i will be using c language.
yes, have a look at the function:
gdk_pixbuf_new_from_data ()
GdkPixbuf * gdk_pixbuf_new_from_data (const guchar *data,
GdkColorspace colorspace,
gboolean has_alpha,
int bits_per_sample,
int width,
int height,
int rowstride,
GdkPixbufDestroyNotify destroy_fn,
gpointer destroy_fn_data);
(In the docs)
精彩评论