Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Can't call method "scaleY" on an undefined value at C:/strawberry/perl/site/lib/ Image/Seek.pm line 137.

by tonyc (Pilgrim)
on Jul 28, 2009 at 04:21 UTC ( #783743=note: print w/ replies, xml ) Need Help??


in reply to Re: Can't call method "scaleY" on an undefined value at C:/strawberry/perl/site/lib/ Image/Seek.pm line 137.
in thread Can't call method "scaleY" on an undefined value at C:/strawberry/perl/site/lib/ Image/Seek.pm line 137.

I've been considering allowing open (or read, the official name) to be called as a class method instead, to avoid errors like this:

my $img = Imager->open(file => $foo) or die Imager->errstr;
It would reduce some of the useless boilerplate Imager->new


Comment on Re^2: Can't call method "scaleY" on an undefined value at C:/strawberry/perl/site/lib/ Image/Seek.pm line 137.
Select or Download Code
Re^3: Can't call method "scaleY" on an undefined value at C:/strawberry/perl/site/lib/ Image/Seek.pm line 137.
by ikegami (Pope) on Jul 28, 2009 at 04:42 UTC
    The typical shortcut for
    my $img = Imager->new(); $img->read(...) or ...;
    is
    my $img = Imager->new(...) or ...;
      This doesn't work, same line 137 error returned.
        It was a suggestion to the module's author for what the interface should be.
Re^3: Can't call method "scaleY" on an undefined value at C:/strawberry/perl/site/lib/ Image/Seek.pm line 137.
by socrtwo (Sexton) on Jul 28, 2009 at 05:08 UTC
    This
    my $img = Imager->new(); $img->open(file => "photo-1.jpg")or die Imager->errstr;
    Gave me this message:
    Can't locate Imager/File/JPEGReader.pm in @INC (@INC contains: C:/stra +wberry/per l/lib C:/strawberry/perl/site/lib .) at C:/strawberry/perl/site/lib/Im +ager.pm li ne 1538. ...propagated at processimage.pl line 8.
    Which I guess is progress however I don't seem to have JPEGReader.pm and cpan command line does not seem to know about it.

      Did you compile in JPEG support?

      Early in my make output:

      gif: includes not found - libraries not found ungif: includes not found - libraries not found jpeg: includes not found - libraries not found <-- png: includes not found - libraries not found tiff: includes not found - libraries not found freetype2: includes not found - libraries not found freetype2: not available T1-fonts: includes not found - libraries not found TT-fonts: includes not found - libraries not found w32: includes found - libraries found

      So no JPEG support for me.

        Yes, this is correct. This appears to be the issue with my installation of Strawberry PERL for me too and is probably the root cause of the error in the title of this post.

        So I found a post comment by Tony Snow, the author of the Imager Perl module. He reports that Window's user should probably install the image extension libraries from their GNUWin32 versions. He then recommends installing Imager manually and pointing the Makefile.PL to the the library locations such as the GNUWin32 version of the JPEG library.

        I have installed the library for jpegs, but I don't know how to point the Makefile.PL to the JPEG library. Does anybody have a suggestion for how to do this? It is not immediately apparent to me, looking over the Makefile.PL file where it's looking for libraries.

        Sinan Ünür is also helping me with this over at Stack Overflow, although the test script he suggested reported an existing PNG support even though no JPEG support was supposedly installed. This message from the test script counters the subsequent message I got from trying to install the Imager 0.67 module manually. Additionally, even after changing all my 2000+ images to PNG and then running my two database building images with appropriate instances changed in the code from JPEG to PNG, the results with my two database filling scripts, are the same errors:

        "Can't call method "scaleY" on an undefined value at C:/strawberry/perl/site/lib/ Image/Seek.pm line 137."

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://783743]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2014-04-18 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (462 votes), past polls