GD module problem in mandrak9 9.0 
Author Message
 GD module problem in mandrak9 9.0

hi

I have a simple perl/gd script

use GD;

 create a new image
 $im = new GD::Image(100,100);
 # allocate some colors
 $white = $im->colorAllocate(255,255,255);
 $black = $im->colorAllocate(0,0,0);
 $red = $im->colorAllocate(255,0,0);
 $blue = $im->colorAllocate(0,0,255);
 # make the background transparent and interlaced
 $im->transparent($white);
 $im->interlaced('true');
 # Put a black frame around the picture
 $im->rectangle(0,0,99,99,$black);
 # Draw a blue oval
 $im->arc(50,50,95,75,0,360,$blue);
 # And fill it with red
 $im->fill(50,50,$red);
#
 aprint $im->png;

when I run it I get:


Can't locate object method "new" via package "image" (perhaps you
forgot to load "image"?) at gd1.pl line 3.

so I nievely add in
use GD::Image;

and then get:


/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at
gd1.pl line 2.
BEGIN failed--compilation aborted at gd1.pl line 2.

since there is no gd/image.pm

any idea what I am missing ????????



Fri, 06 May 2005 12:28:16 GMT  
 GD module problem in mandrak9 9.0

(at) 17 Nov 2002 20:28:16 -0800,

Quote:
> I have a simple perl/gd script

> use GD;

>  create a new image

   # create a new image

Quote:
>  $im = new GD::Image(100,100);
>  # allocate some colors
>  $white = $im->colorAllocate(255,255,255);
>  $black = $im->colorAllocate(0,0,0);
>  $red = $im->colorAllocate(255,0,0);
>  $blue = $im->colorAllocate(0,0,255);
>  # make the background transparent and interlaced
>  $im->transparent($white);
>  $im->interlaced('true');
>  # Put a black frame around the picture
>  $im->rectangle(0,0,99,99,$black);
>  # Draw a blue oval
>  $im->arc(50,50,95,75,0,360,$blue);
>  # And fill it with red
>  $im->fill(50,50,$red);
> #
>  aprint $im->png;

> when I run it I get:


> Can't locate object method "new" via package "image" (perhaps you
> forgot to load "image"?) at gd1.pl line 3.

                                     ~~~~~~

--
Paul Gaborit - <http://www.enstimac.fr/~gaborit/>
Perl en fran?ais - <http://www.enstimac.fr/Perl/>
Remove '.OOO' from e-mail address - Supprimez '.OOO' de l'adresse e-mail



Sat, 07 May 2005 01:07:00 GMT  
 GD module problem in mandrak9 9.0
fair enough now I get


Can't locate object method "png" via package "GD::Image" at gd1.pl line 20.

use GD;
#use GD::Image;
#create a new image
 $im = new GD::Image(100,100);
 # allocate some colors
 $white = $im->colorAllocate(255,255,255);
 $black = $im->colorAllocate(0,0,0);
 $red = $im->colorAllocate(255,0,0);
 $blue = $im->colorAllocate(0,0,255);
 # make the background transparent and interlaced
 $im->transparent($white);
 $im->interlaced('true');
 # Put a black frame around the picture
 $im->rectangle(0,0,99,99,$black);
 # Draw a blue oval
 $im->arc(50,50,95,75,0,360,$blue);
 # And fill it with red
 $im->fill(50,50,$red);
#
 print $im->png;



Sat, 07 May 2005 08:52:20 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Help Needed: Problem building DBD::Pg on MDK 9.0 on an SMP host

2. Problem with GD module in Perl32

3. Problem with GD module

4. GD module usage problem....

5. Problem with GD module

6. GD Graphics Module Install Problems...

7. problem installing GD module using MCPAN

8. problem with GD.pm module

9. GD - problems in creating GD.pl

10. Problems with GD->plot() using GD::Barcode::UPCE

11. GD install problem, can't find gd.h

12. GD: Problem in installing GD 1.20-1.27

 

 
Powered by phpBB® Forum Software