in reply to Re^2: Use of GD::Graph
in thread Use of GD::Graph
1st Perl script:
And the second Perl script:use strict; use warnings; use CGI qw/:standard *table *Tr *td/; use CGI::Carp qw(fatalsToBrowser); use Date::Manip; use DBI; use GD::Graph; use GD::Graph::bars; use GD::Graph::lines; use GD::Graph::histogram; ... (snip HTML and form generation code plus database interrogation code) ... my $graph=GD::Graph::bars->new(); my $format=$graph->export_format; $graph->set ( x_label=>'Uploaders', y_label=>'Total number of uploads' ); @bar_data=(\@x-axis, \@bars); my $gd=$graph->plot(\@bar_data)->$format() or die $graph->error; print '<img src=http://foobar.com/foobar.pl?image=$gd&format=$format>' +;#sends the parameters to the second script
However, I just get a blank where the image should be when I do this. I know the image object is created properly, but passing it as a parameter just doesn't seem to work.#!/usr/bin/perl -w use strict; use warnings; use CGI qw(:standard); my $image=param('image'); my $format=param('format'); print header("image/$format"); binmode STDOUT; print $image;
Any ideas as to what I'm doing wrong?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Use of GD::Graph
by moritz (Cardinal) on May 15, 2008 at 11:01 UTC | |
by campbell (Beadle) on May 15, 2008 at 11:28 UTC |