laziness, impatience, and hubris | |
PerlMonks |
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 03:16 UTC ( [id://783729]=perlquestion: print w/replies, xml ) | Need Help?? |
socrtwo has asked for the wisdom of the Perl Monks concerning the following question: Hi, I am getting the error in the title when calling the Image::Seek module from my script. My script is basically a rehash of the module's suggested code. Here's the error again: Here's my code: Here's the section of the Image::Seek module causing the issue:
Line 137 is:
If I remove ->scaleY(pixels => 128)then line 129: my @cols = $thumb->getscanline(y => $y);gives me essentially the same error. At this point I'm just trying to add one image to the database. There is an image in the directory where I'm running the script to add the image, named "photo-216.jpg". If I change the name to "photo-1.jpg" or "photo-0.jpg" and change the corresponding "add_image" and "query_id" to respectively 1 or 0, it's the same result. I do have a database that is 385 kb big that comes from running makedb.pl below, but it is filled with null characters. I renamed this "haar.db". This is the database that gives me the error. If I recreate the file as an empty one, then the script hangs and after a couple of minutes, it give this message: "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information." If there is no "haar.db" the file still gives me the error in this post's title and unlike running makedb.pl, gives me no database named "haar.db". By the way I get multiple examples of this post's title error also when trying to run this database filling script: http://www.drk7.jp/pub/imgseek/t/makedb.pl.txt. I obviously removed the .txt extension before trying it. The makedb.pl script is from this Japanese site: from this site: http://www.drk7.jp/MT/archives/001258.html. Thanks much If I run makedb.pl I get 362 instances of the error for 2423 stamps images in the directory. The 2423 stamps is the number after removing the "small" thumbnail versions which I though might be causing the issue. Could it be, some of the images are less than 128 pixels and that is the issue? But why doesn't the database get filled with other than the null characters?...Unless they are not really null even though Notebook++ says they are. Also note my images are of stamps which are only sometimes perfect squares. Sometimes they are "landscape" sometimes "portrait".
Back to
Seekers of Perl Wisdom
|
|