]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 10 Feb 2013 16:02:04 +0000 (16:02 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 10 Feb 2013 16:02:04 +0000 (16:02 +0000)
coders/dot.c

index 2ce8815f29757697332319e55e12002a0ed31eaf..1aabb712614d62d6349d7588427a535a15d89f1b 100644 (file)
@@ -135,7 +135,11 @@ static Image *ReadDOTImage(const ImageInfo *image_info,ExceptionInfo *exception)
   (void) AcquireUniqueFilename(read_info->filename);
   (void) FormatLocaleString(command,MaxTextExtent,"-Tsvg -o%s %s",
     read_info->filename,image_info->filename);
+#if !defined(WITH_CGRAPH)
+  graph=agread(GetBlobFileHandle(image));
+#else
   graph=agread(GetBlobFileHandle(image),(Agdisc_t *) NULL);
+#endif
   if (graph == (graph_t *) NULL)
     return ((Image *) NULL);
   option=GetImageOption(image_info,"dot:layout-engine");
@@ -145,6 +149,7 @@ static Image *ReadDOTImage(const ImageInfo *image_info,ExceptionInfo *exception)
     gvLayout(graphic_context,graph,(char *) option);
   gvRenderFilename(graphic_context,graph,(char *) "svg",read_info->filename);
   gvFreeLayout(graphic_context,graph);
+  agclose(graph);
   /*
     Read SVG graph.
   */