 |
Exiv2
|
Go to the documentation of this file.
27 #ifndef XMPSIDECAR_HPP_
28 #define XMPSIDECAR_HPP_
31 #include "exiv2lib_export.h"
117 #endif // #ifndef XMPSIDECAR_HPP_
Provides binary IO on blocks of memory by implementing the BasicIo interface. A copy-on-write impleme...
Definition: basicio.hpp:540
XmpSidecar(BasicIo::AutoPtr io, bool create)
Constructor for an XMP sidecar file. Since the constructor can not return a result,...
Definition: xmpsidecar.cpp:54
const int xmp
XMP sidecar files (see class XmpSidecar)
Definition: xmpsidecar.hpp:45
EXIV2API bool isXmpType(BasicIo &iIo, bool advance)
Check if the file iIo is an XMP sidecar file.
Definition: xmpsidecar.cpp:209
std::string xmpPacket_
XMP packet.
Definition: image.hpp:493
virtual int error() const =0
Returns 0 if the IO source is in a valid state, otherwise nonzero.
IptcData iptcData_
IPTC data container.
Definition: image.hpp:489
Utility class that closes a BasicIo instance upon destruction. Meant to be used as a stack variable i...
Definition: basicio.hpp:264
Dictionary::const_iterator Dictionary_i
typedef for Dictionary iterator
Definition: datasets.hpp:372
void readMetadata()
Read all metadata supported by a specific image format from the image. Before this method is called,...
Definition: xmpsidecar.cpp:76
std::string mimeType() const
Return the MIME type of the image.
Definition: xmpsidecar.cpp:65
@ comment
Exiv2 type for the Exif user comment.
Definition: types.hpp:150
iterator begin()
Begin of the metadata.
Definition: xmp.cpp:355
EXIV2API std::string strError()
Return a system error message and the error code (errno). See strerror(3).
Definition: futils.cpp:356
ExifData exifData_
Exif data container.
Definition: image.hpp:488
EXIV2API void copyIptcToXmp(const IptcData &iptcData, XmpData &xmpData, const char *iptcCharset=0)
Convert (copy) IPTC datasets to XMP properties.
Definition: convert.cpp:1317
Concrete keys for XMP metadata.
Definition: properties.hpp:241
virtual void clearMetadata()
Erase all buffered metadata. Metadata is not removed from the actual image until the writeMetadata() ...
Definition: image.cpp:549
iterator findKey(const XmpKey &key)
Find the first Xmpdatum with the given key, return an iterator to it.
Definition: xmp.cpp:339
An Image subclass to support XMP sidecar files.
EXIV2API Image::AutoPtr newXmpInstance(BasicIo::AutoPtr io, bool create)
Create a new XmpSidecar instance and return an auto-pointer to it. Caller owns the returned object an...
Definition: xmpsidecar.cpp:200
@ useCompactFormat
Use a compact form of RDF.
Definition: xmp_exiv2.hpp:281
EXIV2API void copyXmpToExif(const XmpData &xmpData, ExifData &exifData)
Convert (copy) XMP properties to Exif tags.
Definition: convert.cpp:1298
@ omitPacketWrapper
Omit the XML packet wrapper.
Definition: xmp_exiv2.hpp:279
static int encode(std::string &xmpPacket, const XmpData &xmpData, uint16_t formatFlags=useCompactFormat, uint32_t padding=0)
Encode (serialize) XMP metadata from xmpData into a string xmpPacket. The XMP packet returned in the ...
Definition: xmp.cpp:836
virtual bool eof() const =0
Returns true if the IO position has reached the end, otherwise false.
virtual DataBuf read(long rcount)=0
Read data from the IO source. Reading starts at the current IO position and the position is advanced ...
EXIV2API void copyExifToXmp(const ExifData &exifData, XmpData &xmpData)
Convert (copy) Exif tags to XMP properties.
Definition: convert.cpp:1285
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
A container for XMP data. This is a top-level class of the Exiv2 library.
Definition: xmp_exiv2.hpp:173
Exif and IPTC conversions to and from XMP.
Class to access XMP sidecar files. They contain only XMP metadata.
Definition: xmpsidecar.hpp:51
#define EXV_WARNING
Shorthand for a temp warning log message object and return its ostringstream.
Definition: error.hpp:148
void writeMetadata()
Write metadata back to the image.
Definition: xmpsidecar.cpp:135
XmpMetadata::const_iterator const_iterator
XmpMetadata const iterator type.
Definition: xmp_exiv2.hpp:181
BasicIo::AutoPtr io_
Image data IO pointer.
Definition: image.hpp:487
std::auto_ptr< Image > AutoPtr
Image auto_ptr type.
Definition: image.hpp:84
virtual std::string & xmpPacket()
Return a modifiable reference to the raw XMP packet.
Definition: image.cpp:574
EXIV2API void copyXmpToIptc(const XmpData &xmpData, IptcData &iptcData)
Convert (copy) XMP properties to IPTC datasets.
Definition: convert.cpp:1335
std::auto_ptr< BasicIo > AutoPtr
BasicIo auto_ptr type.
Definition: basicio.hpp:58
bool writeXmpFromPacket() const
Return the flag indicating the source when writing XMP metadata.
Definition: image.cpp:736
BasicError< char > Error
Error class used for exceptions (std::string based)
Definition: error.hpp:323
@ string
IPTC string type.
Definition: types.hpp:147
std::map< std::string, std::string > Dictionary
typedef for string:string map
Definition: datasets.hpp:364
#define EXV_ERROR
Shorthand for a temp error log message object and return its ostringstream.
Definition: error.hpp:150
virtual int seek(long offset, Position pos)=0
Move the current IO position.
std::string toString(const T &arg)
Utility function to convert the argument of any type to a string.
Definition: types.hpp:521
An interface for simple binary IO.
Definition: basicio.hpp:55
XmpData xmpData_
XMP data container.
Definition: image.hpp:490
void setComment(const std::string &comment)
Not supported. XMP sidecar files do not contain a comment. Calling this function will throw an instan...
Definition: xmpsidecar.cpp:70
Abstract base class defining the interface for an image. This is the top-level interface to the Exiv2...
Definition: image.hpp:81
iterator end()
End of the metadata.
Definition: xmp.cpp:360
Basic file utility functions required by Exiv2.
static int decode(XmpData &xmpData, const std::string &xmpPacket)
Decode XMP metadata from an XMP packet xmpPacket into xmpData. The format of the XMP packet must foll...
Definition: xmp.cpp:723
Error class for exceptions, log message class.