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;