Image::DB::Backend - Perl module to access image databases.
use Image::DB::Backend;
my @available_backends = Image::DB::Backend::getBackendIds();
my $backend = Image::DB::Backend::getInstance(``IPTC'');
print ``Got backend with id=''' . $backend-\>getId()
. ``'\n'';
my $hasInfo = $backend->knowsFile(``/path/to/image/file.jpg'');
use Image::DB::File; my $fileObj = $backend->knowsFile(``/path/to/image/file.jpg'');
This modue provides methods to retrieve meta information about an image file that are stored in image databases. These databases can be of totally different structure, as Exif/IPTC (stored within the image file), GThumb, Bins or album (all open-source Linux/Unix databases) or ACDSee (a commercial Windows database).
The access methods to the various databases are implemented in backend-specific modules. These have to be derived from this module.
getInstance(ID)
Returns an Image::DB::Backend object of type ID. This is a factory method for getting an backend instance and is implemented as a class method, that means it does not need an instantiated obect to return a valid result.
getFile(FILENAME)
Returns an Image::DB::File object of the image file defined in FILENAME. Every implementation of L<Image::DB::Backend> has to implement this method.
setFile(FILEOBJECT)
Takes an Image::DB::File object of the image file defined in FILEOBJECT and stores the information contained in this object in the image database. Every implementation of L<Image::DB::Backend> has to implement this method.
getId()
Returns an string representation of the backend id, Every implementation of L<Image::DB::Backend> has to implement this method.
knowsFile(FILENAME)
Returns an boolean value (exactly C<0> or C<1>) if the backend has information about the file FILENAME. Every implementation of L<Image::DB::Backend> has to implement this method.
getBackendIds()
Returns a list of all available type ID. This method is implemented as a class method, that means it does not need an instantiated obect to return a valid result.
toString()
Returns a string representation of the backend. This method is used for string interpolarization, e.g. C<print "This is $backend\n";>.
the Image::DB::Backend::GThumb manpage, the Image::DB::Backend::IPTC manpage
Dirk Ruediger, <dirk@an-der-warnow.de>
Copyright (C) 2004-2005 by Dirk Ruediger
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8 or, at your option, any later version of Perl 5 you may have available.