Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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 ( [id://783748]=note: print w/replies, xml ) Need Help??


in reply to Re^2: 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.

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.
  • Comment on Re^3: Can't call method "scaleY" on an undefined value at C:/strawberry/perl/site/lib/ Image/Seek.pm line 137.
  • Select or Download Code

Replies are listed 'Best First'.
Re^4: Can't call method "scaleY" on an undefined value at C:/strawberry/perl/site/lib/ Image/Seek.pm line 137.
by ikegami (Patriarch) on Jul 28, 2009 at 05:42 UTC

    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."

        I mean Tony Cook not Tony Snow...

        If you've now installed libjpeg, including both the header files and libraries you can point Imager's Makefile.PL at them by setting the IM_INCPATH and IM_LIBPATH environment variables, eg:

        set IM_INCPATH=c:\installed\include set IM_LIBPATH=c:\installed\lib perl Makefile.PL

        or you can supply them on the command-line:

        perl Makefile.PL --incpath=c:\installed\include --libpath=c:\installed +\lib

        (I wondered who that Tony Snow guy was... ;)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-16 14:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found