Loading ...
Sorry, an error occurred while loading the content.

Graph Problem

Expand Messages
  • Prasanna Goupal
    Hi, I am creating graphs using following programs, but i am getting following error, do you have any idea about it? Error : Can t locate object method png
    Message 1 of 10 , Jul 5, 2006
    • 0 Attachment
      Hi,

      I am creating graphs using following programs, but i am getting following error, do you have any idea about it?

      Error :

      Can't locate object method "png" via package "GD::Image" at /proj/Httpd/cgi-bin/show_image.pl line 76.

      Code :

      my $mygraph = '';
      if($type){
      $mygraph = GD::Graph::lines->new(300, 200);
      } else {
      $mygraph = GD::Graph::lines->new(500, 350);
      }
      $mygraph->set(
      x_label => 'Year',
      y_label => 'Trend',
      title => $lable,
      line_types => [1,1,1],
      line_width => 2,
      dclrs => ['green','red','blue'],
      ) or warn $mygraph->error;
      $mygraph->set_legend_font(GD::gdMediumBoldFont);
      $mygraph->set_legend($cus_param1,$cus_param2);
      my $myimage = $mygraph->plot(\@data) or die $mygraph->error;
      print $myimage->png;



      ---------------------------------
      Do you Yahoo!?
      Everyone is raving about the all-new Yahoo! Mail Beta.

      [Non-text portions of this message have been removed]
    • Mr. Shawn H. Corey
      ... Older versions of GD::Image do not create PNGs. Check the version with: perl -MGD -e print $GD::VERSION, n It must be 1.20 or greater. Can you save it
      Message 2 of 10 , Jul 5, 2006
      • 0 Attachment
        Prasanna Goupal wrote:
        > Hi,
        >
        > I am creating graphs using following programs, but i am getting following error, do you have any idea about it?
        >
        > Error :
        >
        > Can't locate object method "png" via package "GD::Image" at /proj/Httpd/cgi-bin/show_image.pl line 76.
        >

        Older versions of GD::Image do not create PNGs. Check the version with:
        perl -MGD -e 'print $GD::VERSION, "\n"' It must be 1.20 or greater.

        Can you save it as a GIF file?


        --
        __END__

        Just my 0.00000002 million dollars worth,
        --- Shawn

        "For the things we have to learn before we can do them, we learn by
        doing them."
        Aristotle

        * Perl tutorials at http://perlmonks.org/?node=Tutorials
        * A searchable perldoc is at http://perldoc.perl.org/
      • Prasanna Goupal
        Hi, Thanks for your support.. I got the cause.. When we install GD module on the server, it asks for different suporrted formats, and i found that png support
        Message 3 of 10 , Jul 5, 2006
        • 0 Attachment
          Hi,

          Thanks for your support.. I got the cause.. When we install GD module on the server, it asks for different suporrted formats, and i found that png support was banned.

          Once again Thanks.

          Regards,
          Prasanna A. Goupal

          "Mr. Shawn H. Corey" <shawnhcorey@...> wrote:
          Prasanna Goupal wrote:
          > Hi,
          >
          > I am creating graphs using following programs, but i am getting following error, do you have any idea about it?
          >
          > Error :
          >
          > Can't locate object method "png" via package "GD::Image" at /proj/Httpd/cgi-bin/show_image.pl line 76.
          >

          Older versions of GD::Image do not create PNGs. Check the version with:
          perl -MGD -e 'print $GD::VERSION, "\n"' It must be 1.20 or greater.

          Can you save it as a GIF file?

          --
          __END__

          Just my 0.00000002 million dollars worth,
          --- Shawn

          "For the things we have to learn before we can do them, we learn by
          doing them."
          Aristotle

          * Perl tutorials at http://perlmonks.org/?node=Tutorials
          * A searchable perldoc is at http://perldoc.perl.org/





          ---------------------------------
          Do you Yahoo!?
          Next-gen email? Have it all with the all-new Yahoo! Mail Beta.

          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.