On Sat, 18 May 2002, steve silvers wrote: > In the code snippet below i'm just looking to have it generate a .gif image > on the fly to the browser. I don't want it to write out the .gif file to a > directory. > > use GD::Graph::pie; > > print "Content-Type: image/png\n\n"; > > @data = ( > ["1st","2nd","3rd","4th","5th","6th"], > [ 4, 2, 3, 4, 3, 3.5] > ); > > $my_graph = new GD::Graph::pie( 250, 200 ); > > $my_graph->set( > title => 'A Pie Chart', > label => 'Label', > axislabelclr => 'black', > pie_height => 36, > > transparent => 0, > ); > > $my_graph->plot(\@data); > > #I don't want a static image file. > #save_chart($my_graph, 'sample91'); > > my $ext = $chart->export_format; > > binmode STDOUT; > print $chart->gd->gif; > > I'm having problems getting this to work.
Probably due to some confusion over whether the format is .png or .gif. It would not surprise me if .gif was not supported any more due to the Unisys patent problem. In any event even if .gif format IS supported by GD::Graph, writing your Content-Type: header for the image as image/png and then outputting .gif data is certain to not work. **** [EMAIL PROTECTED] <Carl Jolley> **** All opinions are my own and not necessarily those of my employer **** _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs