#include <image.hpp>
Inheritance diagram for Exiv2::Image:
Public Types | |
typedef std::auto_ptr< Image > | AutoPtr |
Image auto_ptr type. | |
Public Member Functions | |
Manipulators | |
virtual void | readMetadata ()=0 |
Read all metadata supported by a specific image format from the image. Before this method is called, the various metadata types will be empty. | |
virtual void | writeMetadata ()=0 |
Write metadata back to the image. | |
virtual void | setExifData (const ExifData &exifData)=0 |
Assign new exif data. The new exif data is not written to the image until the writeMetadata() method is called. | |
virtual void | clearExifData ()=0 |
Erase any buffered Exif data. Exif data is not removed from the actual image until the writeMetadata() method is called. | |
virtual void | setIptcData (const IptcData &iptcData)=0 |
Assign new iptc data. The new iptc data is not written to the image until the writeMetadata() method is called. | |
virtual void | clearIptcData ()=0 |
Erase any buffered Iptc data. Iptc data is not removed from the actual image until the writeMetadata() method is called. | |
virtual void | setComment (const std::string &comment)=0 |
Set the image comment. The new comment is not written to the image until the writeMetadata() method is called. | |
virtual void | clearComment ()=0 |
Erase any buffered comment. Comment is not removed from the actual image until the writeMetadata() method is called. | |
virtual void | setMetadata (const Image &image)=0 |
Copy all existing metadata from source Image. The data is copied into internal buffers and is not written to the image until the writeMetadata() method is called. | |
virtual void | clearMetadata ()=0 |
Erase all buffered metadata. Metadata is not removed from the actual image until the writeMetadata() method is called. | |
Accessors | |
virtual bool | good () const=0 |
Check if the Image instance is valid. Use after object construction. | |
virtual const ExifData & | exifData () const=0 |
Returns an ExifData instance containing currently buffered Exif data. | |
virtual ExifData & | exifData ()=0 |
Returns an ExifData instance containing currently buffered Exif data. | |
virtual const IptcData & | iptcData () const=0 |
Returns an IptcData instance containing currently buffered Iptc data. | |
virtual IptcData & | iptcData ()=0 |
Returns an IptcData instance containing currently buffered Iptc data. | |
virtual std::string | comment () const=0 |
Return a copy of the image comment. May be an empty string. | |
virtual BasicIo & | io () const=0 |
Return a reference to the BasicIo instance being used for Io. | |
bool | supportsMetadata (MetadataId metadataId) const |
Check if image supports a particular type of metadata. |
Most client apps will obtain an Image instance by calling a static ImageFactory method. The Image class can then be used to to read, write, and save metadata.
virtual void Exiv2::Image::readMetadata | ( | ) | [pure virtual] |
Read all metadata supported by a specific image format from the image. Before this method is called, the various metadata types will be empty.
This method returns success even if no metadata is found in the image. Callers must therefore check the size of individual metadata types before accessing the data.
Error | if opening or reading of the file fails or the image data is not valid (does not look like data of the specific image type). |
Implemented in Exiv2::Cr2Image, Exiv2::CrwImage, Exiv2::JpegBase, Exiv2::MrwImage, Exiv2::PngImage, and Exiv2::TiffImage.
virtual void Exiv2::Image::writeMetadata | ( | ) | [pure virtual] |
Write metadata back to the image.
All existing metadata sections in the image are either created, replaced, or erased. If values for a given metadata type have been assigned, a section for that metadata type will either be created or replaced. If no values have been assigned to a given metadata type, any exists section for that metadata type will be removed from the image.
Error | if the operation fails |
Implemented in Exiv2::Cr2Image, Exiv2::CrwImage, Exiv2::JpegBase, Exiv2::MrwImage, Exiv2::PngImage, and Exiv2::TiffImage.
virtual void Exiv2::Image::setExifData | ( | const ExifData & | exifData | ) | [pure virtual] |
Assign new exif data. The new exif data is not written to the image until the writeMetadata() method is called.
exifData | An ExifData instance holding exif data to be copied |
Implemented in Exiv2::Cr2Image, Exiv2::CrwImage, Exiv2::JpegBase, Exiv2::MrwImage, Exiv2::PngImage, and Exiv2::TiffImage.
virtual void Exiv2::Image::setIptcData | ( | const IptcData & | iptcData | ) | [pure virtual] |
Assign new iptc data. The new iptc data is not written to the image until the writeMetadata() method is called.
iptcData | An IptcData instance holding iptc data to be copied |
Implemented in Exiv2::Cr2Image, Exiv2::CrwImage, Exiv2::JpegBase, Exiv2::MrwImage, Exiv2::PngImage, and Exiv2::TiffImage.
virtual void Exiv2::Image::setComment | ( | const std::string & | comment | ) | [pure virtual] |
Set the image comment. The new comment is not written to the image until the writeMetadata() method is called.
comment | String containing comment. |
Implemented in Exiv2::Cr2Image, Exiv2::CrwImage, Exiv2::JpegBase, Exiv2::MrwImage, Exiv2::PngImage, and Exiv2::TiffImage.
virtual void Exiv2::Image::setMetadata | ( | const Image & | image | ) | [pure virtual] |
Copy all existing metadata from source Image. The data is copied into internal buffers and is not written to the image until the writeMetadata() method is called.
image | Metadata source. All metadata types are copied. |
Implemented in Exiv2::Cr2Image, Exiv2::CrwImage, Exiv2::JpegBase, Exiv2::MrwImage, Exiv2::PngImage, and Exiv2::TiffImage.
virtual bool Exiv2::Image::good | ( | ) | const [pure virtual] |
Check if the Image instance is valid. Use after object construction.
Implemented in Exiv2::Cr2Image, Exiv2::CrwImage, Exiv2::JpegBase, Exiv2::MrwImage, Exiv2::PngImage, and Exiv2::TiffImage.
virtual const ExifData& Exiv2::Image::exifData | ( | ) | const [pure virtual] |
Returns an ExifData instance containing currently buffered Exif data.
The Exif data may have been read from the image by a previous call to readMetadata() or added directly. The Exif data in the returned instance will be written to the image when writeMetadata() is called.
Implemented in Exiv2::Cr2Image, Exiv2::CrwImage, Exiv2::JpegBase, Exiv2::MrwImage, Exiv2::PngImage, and Exiv2::TiffImage.
virtual ExifData& Exiv2::Image::exifData | ( | ) | [pure virtual] |
Returns an ExifData instance containing currently buffered Exif data.
The contained Exif data may have been read from the image by a previous call to readMetadata() or added directly. The Exif data in the returned instance will be written to the image when writeMetadata() is called.
Implemented in Exiv2::Cr2Image, Exiv2::CrwImage, Exiv2::JpegBase, Exiv2::MrwImage, Exiv2::PngImage, and Exiv2::TiffImage.
virtual const IptcData& Exiv2::Image::iptcData | ( | ) | const [pure virtual] |
Returns an IptcData instance containing currently buffered Iptc data.
The contained Iptc data may have been read from the image by a previous call to readMetadata() or added directly. The Iptc data in the returned instance will be written to the image when writeMetadata() is called.
Implemented in Exiv2::Cr2Image, Exiv2::CrwImage, Exiv2::JpegBase, Exiv2::MrwImage, Exiv2::PngImage, and Exiv2::TiffImage.
virtual IptcData& Exiv2::Image::iptcData | ( | ) | [pure virtual] |
Returns an IptcData instance containing currently buffered Iptc data.
The contained Iptc data may have been read from the image by a previous call to readMetadata() or added directly. The Iptc data in the returned instance will be written to the image when writeMetadata() is called.
Implemented in Exiv2::Cr2Image, Exiv2::CrwImage, Exiv2::JpegBase, Exiv2::MrwImage, Exiv2::PngImage, and Exiv2::TiffImage.
virtual BasicIo& Exiv2::Image::io | ( | ) | const [pure virtual] |
Return a reference to the BasicIo instance being used for Io.
This refence is particularly useful to reading the results of operations on a MemIo instance. For example after metadata has been modified and the writeMetadata() method has been called, this method can be used to get access to the modified image.
Implemented in Exiv2::Cr2Image, Exiv2::CrwImage, Exiv2::JpegBase, Exiv2::MrwImage, Exiv2::PngImage, and Exiv2::TiffImage.