From owner-freebsd-perl@FreeBSD.ORG Thu Jun 4 20:25:10 2009 Return-Path: Delivered-To: freebsd-perl@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFCDE1065673 for ; Thu, 4 Jun 2009 20:25:10 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by mx1.freebsd.org (Postfix) with ESMTP id A318A8FC12 for ; Thu, 4 Jun 2009 20:25:10 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MCJUr-00010L-P8 for freebsd-perl@freebsd.org; Thu, 04 Jun 2009 13:25:09 -0700 Message-ID: <23877108.post@talk.nabble.com> Date: Thu, 4 Jun 2009 13:25:09 -0700 (PDT) From: Demonjack To: freebsd-perl@freebsd.org In-Reply-To: <20090604200521.GA84861@heechee.tobez.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: demonjack42@yahoo.com References: <23876448.post@talk.nabble.com> <20090604200521.GA84861@heechee.tobez.org> Subject: Re: GD::Image Can't locate object newFromPng X-BeenThere: freebsd-perl@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: maintainer of a number of perl-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 20:25:11 -0000 Here's a piece of code that will generate the problem on my system. I think the problem is the the GD module doesn't have the PNG support in it, but it said it compiled with it so, I'm not sure how to determine if indeed it did or not? #!/usr/bin/perl # # use Cflow qw(:flowvars find); # for reading Cflowd data files use Socket; # for socket functions use POSIX; # for strftime use RRDs; # RRDTOOL stuff use Time::Local; # need the timelocal function use Storable; use Net::Patricia; use GD; use strict; use warnings; my $imgFile = "image-16790-0001.png"; my $newimage = new GD::Image(100,100); open (PNG, $imgFile) || die; my $myImage = newFromPng GD::Image(\*PNG); close PNG; _________________________________________ thx Demon Anton Berezin-2 wrote: > > On Thu, Jun 04, 2009 at 12:41:24PM -0700, Demonjack wrote: >> >> FreeBSD 7.0 >> Perl 5.8.9 >> >> I installed... >> >> libpng-1.2.36 >> gd-2.0.35 >> GD-2.41 >> >> I made sure all compiled with PNG support. However, whenever I try and >> run >> the following line of code. >> >> my $myImage = newFromPng GD::Image(\*PNG); or alternatively.... >> my $myImage = GD::Image->newFromPng($imgFile, 1) >> >> I get the following error. >> >> Can't located object method "newFromPng" via package "GD::Image" at blah >> blah blah. >> >> I'm sure it's something I've missed but I can't find it. At this point >> I've >> looked at it so much I can't see the forest for the trees....... >> >> Any help would be appreciated. I'm going to go take a nap. > > Works fine here. Can you post a complete script that exhibits the > problem? > > Cheers, > \Anton. > -- > There is no beauty in entropy. -- Eliezer Yudkowsky > _______________________________________________ > freebsd-perl@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-perl > To unsubscribe, send any mail to "freebsd-perl-unsubscribe@freebsd.org" > > -- View this message in context: http://www.nabble.com/GD%3A%3AImage-Can%27t-locate-object-newFromPng-tp23876448p23877108.html Sent from the freebsd-perl mailing list archive at Nabble.com.