Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_perl thread: GD module


Message #1 by "Piers Burgoyne" <piersburgoyne@b...> on Fri, 24 Jan 2003 23:24:09 -0000
Don't worry, I got it working fine.

At least the mailing list is getting some activity.

-----Original Message-----
From: Piers Burgoyne [mailto:piersburgoyne@b...]
Sent: 24 January 2003 23:24
To: Pro_Perl
Subject: [pro_perl] GD module



Hi,

Does anyone know how to get the GD module working?

I have tried it on playstation linux and redhat 7.2, redhat will not allow
it to install, and playstation linux produces a file that just looks like
this:

GD::Image=SCALAR(0x100106fc)

The program I used is as follows:

#!/usr/bin/perl -w
use strict;
use GD;

my $gif = new GD::Image(100, 100);
my $white = $gif->colorAllocate(255, 255, 255);
my $red   = $gif->colorAllocate(255,   0,   0);
$gif->transparent($white);
$gif->arc(50, 50, 30, 30, 0, 360, $red);
open(GIF, ">circle.gif") or die "open failed: $!\n";
binmode GIF;
print GIF $gif;
close GIF;

...I understand that the GD module is an interface to libgd but not much
else (i.e. what is libgd?).

Any help much appreciated.

Many thanks,

Piers




  Return to Index