Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > dynamically generating graphics

Reply
Thread Tools

dynamically generating graphics

 
 
MJL
Guest
Posts: n/a
 
      09-17-2003
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
 
Reply With Quote
 
 
 
 
Martien Verbruggen
Guest
Posts: n/a
 
      09-17-2003
On 16 Sep 2003 22:23:40 -0700,
MJL <(E-Mail Removed)> 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.
|
 
Reply With Quote
 
 
 
 
Gregory Toomey
Guest
Posts: n/a
 
      09-17-2003
"MJL" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) m...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Any Libraries Out There for Generating Graphics Files? Jerry Stuckle C Programming 13 10-22-2010 11:30 AM
Upgrading graphics on a computer with Integrated Graphics sharonf Computer Support 3 03-27-2007 06:21 AM
Gizmodo: NVIDIA Ships 128-Core Graphics Cards for High-End Film Editors Graphics Pros Silverstrand Front Page News 0 03-05-2007 03:32 PM
Intel Graphics Media Accelerator 900 Graphics Harvey Gratt Computer Support 3 10-09-2005 02:40 AM
Generating graphics on the fly from Oracle data? D. Alvarado Java 1 10-12-2004 01:53 PM



Advertisments