From: cristy Date: Sun, 10 Feb 2013 16:02:04 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~4268 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=371f49ba1d64637bd8759f1b22eea459f59872a0;p=imagemagick --- diff --git a/coders/dot.c b/coders/dot.c index 2ce8815f2..1aabb7126 100644 --- a/coders/dot.c +++ b/coders/dot.c @@ -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. */