Image::DB::File - OO Representation of an image File object
use Image::DB::File;
my $image = new Image::DB::File($filename);
$imageObject->getBackend()->getId(); $imageObject->getAbsoluteFilename(); $imageObject->getFilename(); $imageObject->getProperties()->{file_media_type}; $imageObject->setPlace(``Rostock''); $imageObject->getDate(); $imageObject->setDescription(``My new description'');
my $clonedImageObject = Image::DB::File->new($imageObject, ``BackendType'');
This class describes an image file. It searches for image database backends to retrieve it's information (see the Image::DB::Backend manpage for information). Furthermore it uses Image::Info to get meta information about a file and creates an Object representation of the gathered information.
new(FILENAME)
Create a new L<Image::DB::File> object from the filename If no BACKEND is specified as second argument, then the first backend that provides information about the image file is used implicitly. Otherwise (if the BACKEND was specified as argument) this backend is used even if it does not provide information about the image file.
Create a new L<Image::DB::File> object from the The backend that is specified as second argument is used even if it does not provide information about the image file. This is a cloning constructor. The specified backend must differ from the backend of the FILEOBJ; otherwise an exception is thrown.
getBackend()
Sets or returns the storage backend (as Image::DB::Backend object)
getDescription()
Sets or returns the image description
getFilename()
Sets or returns the filename (without path)
getFoldername()
Sets or returns the path part of the filename (without filename)
getDisplayname()
Returns a trimmed presentation of the AbsoluteFilename. If the filename is too long, then only the leading and trailing part of the name is returned.
getKeywords()
Sets or returns the list of keywords
getDate()
Sets or returns the date in seconds since epoch. If a string representation of the date is known, then the function str2time() from the Date::Parse module can be used to calculate the time value.
getPlace()
Sets or returns the place, where the image was taken
getAbsoluteFilename()
Returns the absolute file name (a string concaternation of getFoldername() and getFilename()).
getProperties()
Returns an Image::Info data structure with meta information of the image file.
asXML()
Returns the meta information of the object as XML structure.
toString()
Returns a string representation of the file object. This method is used for string interpolarization, e.g. C<print "This is $imageobject\n";>.
the Image::Info manpage, the Image::DB::Backend manpage
Dirk Ruediger, <drue@an-der-warnow.de>
Copyright (C) 2004 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.3 or, at your option, any later version of Perl 5 you may have available.
=cut