#include <crwimage.hpp>
Inheritance diagram for Exiv2::CrwImage:
Public Member Functions | |
Manipulators | |
void | readMetadata () |
Read all metadata supported by a specific image format from the image. Before this method is called, the image metadata will be cleared. | |
void | writeMetadata () |
Write metadata back to the image. | |
void | setIptcData (const IptcData &iptcData) |
Not supported. CRW format does not contain IPTC metadata. Calling this function will throw an Error(32). | |
Accessors | |
std::string | mimeType () const |
Return the MIME type of the image. |
Exiv2::CrwImage::CrwImage | ( | BasicIo::AutoPtr | io, | |
bool | create | |||
) |
Constructor that can either open an existing CRW image or create a new image from scratch. If a new image is to be created, any existing data is overwritten. Since the constructor can not return a result, callers should check the good() method after object construction to determine success or failure.
io | An auto-pointer that owns a BasicIo instance used for reading and writing image metadata. Important: The constructor takes ownership of the passed in BasicIo instance through the auto-pointer. Callers should not continue to use the BasicIo instance after it is passed to this method. Use the Image::io() method to get a temporary reference. | |
create | Specifies if an existing image should be read (false) or if a new file should be created (true). |
Exiv2::CrwImage::CrwImage | ( | BasicIo::AutoPtr | io, | |
bool | create | |||
) |
Constructor that can either open an existing CRW image or create a new image from scratch. If a new image is to be created, any existing data is overwritten. Since the constructor can not return a result, callers should check the good() method after object construction to determine success or failure.
io | An auto-pointer that owns a BasicIo instance used for reading and writing image metadata. Important: The constructor takes ownership of the passed in BasicIo instance through the auto-pointer. Callers should not continue to use the BasicIo instance after it is passed to this method. Use the Image::io() method to get a temporary reference. | |
create | Specifies if an existing image should be read (false) or if a new file should be created (true). |
void Exiv2::CrwImage::readMetadata | ( | ) | [virtual] |
Read all metadata supported by a specific image format from the image. Before this method is called, the image metadata will be cleared.
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). |
Implements Exiv2::Image.
void Exiv2::CrwImage::writeMetadata | ( | ) | [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 |
Implements Exiv2::Image.
std::string Exiv2::CrwImage::mimeType | ( | ) | const [inline, virtual] |
Return the MIME type of the image.
Implements Exiv2::Image.