sheltem has asked for the wisdom of the Perl Monks concerning the following question:

Hallo! I need to generate some diagrams with Perl. Is there a way to export them to an JPEG / GIF-file? May be, a module can help, witch I can install on my server? Much thanx, Roman

Replies are listed 'Best First'.
Re: Diagram to JPEG
by gjb (Vicar) on Jan 20, 2003 at 09:03 UTC

    You might want to have a look at GraphViz to communicate with, well, GraphViz, a series of programs to produce nice renderings of graphs (if your diagram can be expressed as a graph).

    To create/manipulate graphs in Perl, Graph comes to the resque and using Graph::Writer it can be saved to a file that can be used by GraphViz.

    Note that I use the word "graph" in the mathematical sense of a set of vertices connected with edges, not in the sense of a plot.

    Hope this helps, -gjb-

Re: Diagram to JPEG
by grantm (Parson) on Jan 20, 2003 at 09:10 UTC

    The GD module allows you to draw geometric shapes, lines and fills then write the result out as PNG (or JPEG I think). Note, the JPEG format is usually a poor choice for line art.

      Thank You, but these line arts I want to use for guestbook for other users, so that these users can get a diagram from a "reletionship-statistic" (http://www.sheltem.de/cgi-bin/counter.cgi?19278) an put it in the style img...jpg/img in theyr own guestbook. Best Greetings, Roman
Re: Diagram to JPEG
by OM_Zen (Scribe) on Jan 20, 2003 at 16:26 UTC
    Hi,

    The GD:: and Graph:: distributions are for the graphic side of perl