dynamically generating graphics

M

MJL

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
 
M

Martien Verbruggen

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
 
G

Gregory Toomey

MJL said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top