]> granicus.if.org Git - graphviz/commitdiff
gdk_pixbuf to use gvdevice_write()
authorellson <devnull@localhost>
Wed, 3 Oct 2007 22:47:54 +0000 (22:47 +0000)
committerellson <devnull@localhost>
Wed, 3 Oct 2007 22:47:54 +0000 (22:47 +0000)
plugin/gdk_pixbuf/gvdevice_gdk_pixbuf.c

index b47b2035609cefc8962d8bfa2244e1f666d23a6a..f897ae8be592401d1893729c53638f25523bc917 100644 (file)
@@ -59,10 +59,12 @@ argb2rgba ( unsigned int width, unsigned int height, unsigned char *data)
     }
 }
 
+extern size_t gvdevice_write(GVJ_t * job, char *s, unsigned int len);
+
 static gboolean
 writer ( const gchar *buf, gsize count, GError **error, gpointer data)
 {
-    if (count == fwrite(buf, 1, count, (FILE *)data))
+    if (count == gvdevice_write((GVJ_t *)data, (char*)buf, count))
         return TRUE;
     return FALSE;
 }
@@ -104,7 +106,7 @@ static void gdk_pixbuf_format(GVJ_t * job)
                 NULL                    // destroy_fn_data
                );
 
-    gdk_pixbuf_save_to_callback(pixbuf, writer, job->output_file, format_str, NULL, NULL);
+    gdk_pixbuf_save_to_callback(pixbuf, writer, job, format_str, NULL, NULL);
 
     gdk_pixbuf_unref(pixbuf);
 }