Having installed the PEAR GraphViz package I'm trying to follow the second answer on this page to create a JPEG of a graph. As test code, I have the following:
<?php
require_once 'Image/GraphViz.php';
$graph = new Image_GraphViz();
$graph->addNode('A');
$img = $graph->fetch('jpeg', 'dot');
print "IMG: " . $img;
I've also tried it using the $graph->image('jpeg', 'dot');
method. Both ways, it returns an empty string. When I change the format to something like SVG, it works, which makes me think that certain image generation libraries just aren't installed. But I have the regular (commandline) Graphviz tools installed and they generate images fine. What do I need to install to make this work so PHP can generate images itself?