dynamically generating graphics

Discussion in 'Perl Misc' started by MJL, Sep 17, 2003.

  1. MJL

    MJL Guest

    Is it difficult to dynamically generate a jpg in PERL? For example,
    create a pie-chart or other graphs? What about including other
    images?

    I would like to dynamically create jpg's or gif's for my website and I
    heard that it can be done in PERL.

    Thanks!

    mjl
     
    MJL, Sep 17, 2003
    #1
    1. Advertising

  2. On 16 Sep 2003 22:23:40 -0700,
    MJL <> wrote:
    > Is it difficult to dynamically generate a jpg in PERL?


    I don't know about PERL, but with Perl you can use modules.

    You can use Imager, Image::Magick, or GD. Or you can use any other
    package that creates some sort of bitmap and convert it to JPEG format
    with Image::Magick or some such.

    See your local CPAN mirror, or start at http://search.cpan.org/.

    > For example,
    > create a pie-chart or other graphs? What about including other
    > images?


    There are already modules available on CPAN. See abovementioned URL.
    GD::Graph is one that I know particularly well, but there are several
    others.

    It'd be better to create PNG files instead of JPEG, though. JPEG's
    compression algorithm isn't very good at images with typical charts.

    > I would like to dynamically create jpg's or gif's for my website


    Most free modules at the moment don't do GIF because of the patenting
    issues involved. GIF is inferior to PNG for this sort of thing
    (anything, really) anyway. JPEG is not a good file format for charts.

    > and I
    > heard that it can be done in PERL.


    Please, stop saying PERL. It hurts.

    Martien
    --
    |
    Martien Verbruggen | Unix is user friendly. It's just selective
    Trading Post Australia | about its friends.
    |
     
    Martien Verbruggen, Sep 17, 2003
    #2
    1. Advertising

  3. "MJL" <> wrote in message
    news:...
    > Is it difficult to dynamically generate a jpg in PERL? For example,
    > create a pie-chart or other graphs? What about including other
    > images?


    Its easy once you know how. Use the GD module
    http://search.cpan.org/author/LDS/GD-2.07/GD.pm

    >
    > I would like to dynamically create jpg's or gif's for my website and I
    > heard that it can be done in PERL.


    Gifs are only supported up to Version 1.18 of GD (which is still available
    for download); the latest version of GD uses png as the graphics format.

    Have at look at the stock market charts at my site www.ipo-australia.com to
    give you some basic ideas.

    gtoomey
     
    Gregory Toomey, Sep 17, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. -=Chris=-
    Replies:
    2
    Views:
    1,663
    -=Chris=-
    Nov 9, 2003
  2. John Edwards
    Replies:
    1
    Views:
    316
    Hermit Dave
    Jan 16, 2004
  3. D. Alvarado
    Replies:
    1
    Views:
    325
    Andrew Thompson
    Oct 12, 2004
  4. Steve Holden
    Replies:
    14
    Views:
    685
    Christophe
    Jan 23, 2006
  5. Jerry Stuckle
    Replies:
    13
    Views:
    392
    Tom St Denis
    Oct 22, 2010
Loading...

Share This Page