% July 1992 %
% %
% %
-% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
image_info->filename);
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickSignature);
- image=AcquireImage(image_info);
+ image=AcquireImage(image_info,exception);
status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
if (status == MagickFalse)
return((Image *) NULL);
(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");
gvLayout(graphic_context,graph,(char *) option);
gvRenderFilename(graphic_context,graph,(char *) "svg",read_info->filename);
gvFreeLayout(graphic_context,graph);
+ agclose(graph);
/*
Read SVG graph.
*/
entry=SetMagickInfo("DOT");
#if defined(MAGICKCORE_GVC_DELEGATE)
entry->decoder=(DecodeImageHandler *) ReadDOTImage;
+#endif
+ entry->blob_support=MagickFalse;
+ entry->description=ConstantString("Graphviz");
+ entry->module=ConstantString("DOT");
+ (void) RegisterMagickInfo(entry);
+ entry=SetMagickInfo("GV");
+#if defined(MAGICKCORE_GVC_DELEGATE)
+ entry->decoder=(DecodeImageHandler *) ReadDOTImage;
#endif
entry->blob_support=MagickFalse;
entry->description=ConstantString("Graphviz");
*/
ModuleExport void UnregisterDOTImage(void)
{
+ (void) UnregisterMagickInfo("GV");
(void) UnregisterMagickInfo("DOT");
#if defined(MAGICKCORE_GVC_DELEGATE)
gvFreeContext(graphic_context);