CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Advanced:
GD problems


New User

Mar 31, 2011, 10:15 AM

Post #1 of 3 (3525 views)
GD problems Can't Post

Hello everybody. Excues me English is so bad.
I have in my computer Perl - Apache - Windows.
I try to use GD library, I can create charts, but when I try made a polyline, Apache send a internal error. Its a Apache configuration problem? or its a GD problem?.

Thanks for your answers.

The code is the next.....

use strict;

use CGI::Carp qw(fatalsToBrowser);
use CGI qw/:standard/;

use GD;

my $image = new GD::Image(401,201);
my $x1 =10;
my $y1 = 0;
my $x3=100;
my $y3 = 100;
my $black = $image->colorAllocate(0,0,0);
$image->rectangle($x1-10, $y1+10, $x3+10, $y3-10, $black);

print $image->png;


Veteran / Moderator

Mar 31, 2011, 10:31 AM

Post #2 of 3 (3524 views)
Re: [jimmy1977] GD problems [In reply to] Can't Post

You need to output the proper content type header before outputting the image.

New User

Mar 31, 2011, 12:23 PM

Post #3 of 3 (3518 views)
Re: [FishMonger] GD problems [In reply to] Can't Post

thanks, so so much fishmonger, it was a simple omision


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives