Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Can't locate object method "gif" via package "GD::Image"
Hi all,


I have installed Perl-GD , and tried to use the GD::Image

it throws the following error message ,

Can't locate object method "gif" via package "GD::Image"


how can i eliminate the above error?


Thanks,


Report this thread to moderator Post Follow-up to this message
Old Post
Sivasakthi
04-02-08 01:08 PM


Re: Can't locate object method "gif" via package "GD::Image"
On Wed, 02 Apr 2008 17:37:11 +0530, msivasakthi@gmail.com (sivasakthi)
wrote:

>Hi all,
>
>
>I have installed Perl-GD , and tried to use the GD::Image
>
>it throws the following error message ,
>
>Can't locate object method "gif" via package "GD::Image"
>
>
>how can i eliminate the above error?
>
>
>Thanks,

You don't say what platform or version levels you are using,
but the best bet is to upgrade to the latest gd c library from
boutell.com then install the latest Perl GD module.
http://www.boutell.com/gd/

Read the README that comes with the GD module... from the
Frequently Asked Questions
 ########################################
##################
4. My scripts fail with "Can't locate object method 'png' via package
"GD::Image".

libgd can now be built with support for one or more of the PNG, GIF,
XPM or
JPEG formats. If one or more of these formats are not supported by
libgd, then
the corresponding GD::Image methods will be unavailable.
Unfortunately, many
older scripts assume that the png() method will always be present.
You can
work around this issue with code like the following:

my $image = $gd->can('png') ? $gd->png : $gd->gif;

or if you prefer eval {}

my $image = eval {$gd->png} || $gd->gif;

As of libgd 2.0.33, GIF support is always compiled in, so (for the
time being!)
this is a safe fallback.
 ########################################
###############


zentara
--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html

Report this thread to moderator Post Follow-up to this message
Old Post
Zentara
04-03-08 12:18 AM


Re: Can't locate object method "gif" via package "GD::Image"

>
> You don't say what platform or version levels you are using,
> but the best bet is to upgrade to the latest gd c library from
> boutell.com then install the latest Perl GD module.
> http://www.boutell.com/gd/
>
> Read the README that comes with the GD module... from the
> Frequently Asked Questions
>  ########################################
##################
> 4. My scripts fail with "Can't locate object method 'png' via package
> "GD::Image".
>
>    libgd can now be built with support for one or more of the PNG, GIF,
> XPM or
>    JPEG formats. If one or more of these formats are not supported by
> libgd, then
>    the corresponding GD::Image methods will be unavailable.
> Unfortunately, many
>    older scripts assume that the png() method will always be present.
> You can
>    work around this issue with code like the following:
>
>       my $image = $gd->can('png') ? $gd->png : $gd->gif;
>
>    or if you prefer eval {}
>
>       my $image = eval {$gd->png} || $gd->gif;
>
>    As of libgd 2.0.33, GIF support is always compiled in, so (for the
> time being!)
>    this is a safe fallback.
>  ########################################
###############
>
>
> zentara
> --
> I'm not really a human, but I play one on earth.
> http://zentara.net/japh.html
>


I have tested in RHEL 5 release ...


# uname -a
Linux TEST 2.6.18-36.el5 #1 SMP Fri Jul 20 14:27:44 EDT 2007 ia64 ia64
ia64 GNU/Linux


I have upgraded GD to  GD-2.35 version.. now its works correctly..

Thanks....



Report this thread to moderator Post Follow-up to this message
Old Post
Sivasakthi
04-03-08 01:11 PM


Re: Can't locate object method "gif" via package "GD::Image"


>
> You don't say what platform or version levels you are using,
> but the best bet is to upgrade to the latest gd c library from
> boutell.com then install the latest Perl GD module.
> http://www.boutell.com/gd/
>
> Read the README that comes with the GD module... from the
> Frequently Asked Questions
>  ########################################
##################
> 4. My scripts fail with "Can't locate object method 'png' via package
> "GD::Image".
>
>    libgd can now be built with support for one or more of the PNG, GIF,
> XPM or
>    JPEG formats. If one or more of these formats are not supported by
> libgd, then
>    the corresponding GD::Image methods will be unavailable.
> Unfortunately, many
>    older scripts assume that the png() method will always be present.
> You can
>    work around this issue with code like the following:
>
>       my $image = $gd->can('png') ? $gd->png : $gd->gif;
>
>    or if you prefer eval {}
>
>       my $image = eval {$gd->png} || $gd->gif;
>
>    As of libgd 2.0.33, GIF support is always compiled in, so (for the
> time being!)
>    this is a safe fallback.
>  ########################################
###############
>
>
> zentara
> --
> I'm not really a human, but I play one on earth.
> http://zentara.net/japh.html
>


I have tested in RHEL 5 release ...


# uname -a
Linux TEST 2.6.18-36.el5 #1 SMP Fri Jul 20 14:27:44 EDT 2007 ia64 ia64
ia64 GNU/Linux


I have upgraded GD to  GD-2.35 version.. now its works correctly..

Thanks....



Report this thread to moderator Post Follow-up to this message
Old Post
Sivasakthi
04-03-08 01:11 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 11:06 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.