Hello. I have a problem with loading data that I got from an cairo image surface with cairo_image_surface_get_data(). I got the data with: ------------------------------- long width, height, len; char *data, *data_tmp;
data_tmp = cairo_image_surface_get_data(surface); width = cairo_image_surface_get_width(surface); stride = cairo_format_stride_for_width(CAIRO_FORMAT_RGB24, width); height = cairo_image_surface_get_height(surface); data = g_malloc(stride * height); memcpy(data, data_tmp, stride * height); len = stride * height; ------------------------------- Then I try to load that data with PixbufLoader: ------------------------------- ... loader = gdk_pixbuf_loader_new(); gdk_pixbuf_loader_write(loader, data, len, &error); ... ------------------------------- But loading from data failed with error "unknown image file format". Is there another way to load that data? Please help. Greets, Luka
_______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list