views:

251

answers:

3

I'm trying to use the GraphViz tools to generate some dependency graphs but I'm having zero luck getting dot to export images. SVG works fine, but anything else (jpeg, gif, png) cause dot to crash.

Here's my graph:

digraph test {
 main -> parse -> execute;
 main -> init;
 main -> cleanup;
 execute -> make_string;
 execute -> printf
 init -> make_string;
 main -> printf;
 execute -> compare;
}

Here's the command-line that works (for svg):

dot test.dot -Tsvg -o test.svg

Here are the command lines that cause a crash:

dot test.dot -Tjpg -o test.jpg
dot test.dot -Tjpeg -o test.jpeg
dot test.dot -Tpng -o test.png

Am I missing something obvious?

Thanks,

(Note this is on WinXP 32-bit using the 2.24 graphviz package).

+1  A: 

Nothing obvious - those "just work" for me, but could you be missing some helper libraries for image formats?

Harold L
+1  A: 

Works fine here (Debian testing, graphviz 2.20.2-3+b4):

$ dot test.dot -Tjpeg -o test.jpeg
$ file test.jpeg 
test.jpeg: JPEG image data, JFIF standard 1.01, comment: "CREATOR: gd-jpeg v1.0 (using IJ"
$ dot test.dot -Tpng -o test.png
$ file test.png
test.png: PNG image, 480 x 347, 8-bit/color RGBA, non-interlace

What is your system?

Dirk Eddelbuettel
+1  A: 

Ok false alarm, it looks like the installer missed out some files for some reason. Doing an uninstall/reinstall fixed it.

Thanks for the sanity checks!

Andrew Grant