Posted on 2006-12-28 21:01:56-08 by joonsus
STRANGE. savedb is not saving. Gives a zero-size database file.
I'm using Image::Seek module, Added a few images (png format) using add_image($img, $id) ( where $img is the name of the image and $id is some number. ) I can't seem to get the code to save to the database. Any suggestions would be greatly appreciated. Thanks here's the complete code i have so far.
#!/usr/local/bin/perl use Image::Seek qw(loaddb add_image query_id savedb); use Image::Imlib2; loaddb("image.db"); $counter = 0; for my $input_file (@ARGV) { $counter++; print "$input_file\n"; # my $img = Imager->new(); # $img->open(file => "$image"); my $img = Image::Imlib2->load($input_file); add_image($img, $counter); } savedb("image.db"); # my @results = query_id(1); exit;
Direct Responses: 8015 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.