 |
Exiv2
|
24 #include "exiv2lib_export.h"
27 #include "basicio.hpp"
30 #include "xmp_exiv2.hpp"
64 typedef enum { kpsNone, kpsBasic, kpsXMP, kpsRecursive
65 , kpsIccProfile , kpsIptcErase
91 uint16_t supportedMetadata,
106 virtual void printStructure(std::ostream& out,
PrintStructureOption option =kpsNone,
int depth=0);
120 virtual void readMetadata() =0;
133 virtual void writeMetadata() =0;
139 virtual void setExifData(
const ExifData& exifData);
144 virtual void clearExifData();
150 virtual void setIptcData(
const IptcData& iptcData);
155 virtual void clearIptcData();
167 virtual void setXmpPacket(
const std::string& xmpPacket);
180 virtual void clearXmpPacket();
193 virtual void setXmpData(
const XmpData& xmpData);
207 virtual void clearXmpData();
213 virtual void setComment(
const std::string&
comment);
218 virtual void clearComment();
225 virtual void setIccProfile(
DataBuf& iccProfile,
bool bTestValid=
true);
230 virtual void clearIccProfile();
247 virtual void setMetadata(
const Image& image);
252 virtual void clearMetadata();
292 virtual std::string& xmpPacket();
307 void writeXmpFromPacket(
bool flag);
334 bool isBigEndianPlatform();
339 bool isLittleEndianPlatform();
341 bool isStringType(uint16_t type);
342 bool isShortType(uint16_t type);
343 bool isLongType(uint16_t type);
344 bool isLongLongType(uint16_t type);
345 bool isRationalType(uint16_t type);
346 bool is2ByteType(uint16_t type);
347 bool is4ByteType(uint16_t type);
348 bool is8ByteType(uint16_t type);
352 uint64_t byteSwap(uint64_t value,
bool bSwap)
const;
353 uint32_t byteSwap(uint32_t value,
bool bSwap)
const;
354 uint16_t byteSwap(uint16_t value,
bool bSwap)
const;
355 uint16_t byteSwap2(
const DataBuf& buf,
size_t offset,
bool bSwap)
const;
356 uint32_t byteSwap4(
const DataBuf& buf,
size_t offset,
bool bSwap)
const;
357 uint64_t byteSwap8(
const DataBuf& buf,
size_t offset,
bool bSwap)
const;
384 virtual std::string mimeType()
const =0;
388 virtual int pixelWidth()
const;
392 virtual int pixelHeight()
const;
404 virtual const ExifData& exifData()
const;
416 virtual const IptcData& iptcData()
const;
428 virtual const XmpData& xmpData()
const;
432 virtual std::string
comment()
const;
436 virtual const std::string& xmpPacket()
const;
463 bool supportsMetadata(
MetadataId metadataId)
const;
465 bool writeXmpFromPacket()
const;
473 uint16_t supportedMetadata
475 imageType_ = imageType;
476 supportedMetadata_ = supportedMetadata;
496 const std::string& tagName(uint16_t tag);
499 const char* typeName(uint16_t tag)
const;
512 uint16_t supportedMetadata_;
513 bool writeXmpFromPacket_;
516 std::map<int,std::string> tags_;
548 static BasicIo::AutoPtr createIo(
const std::string& path,
bool useCurl =
true);
549 #ifdef EXV_UNICODE_PATH
554 static BasicIo::AutoPtr createIo(
const std::wstring& wpath,
bool useCurl =
true);
569 static Image::AutoPtr open(
const std::string& path,
bool useCurl =
true);
570 #ifdef EXV_UNICODE_PATH
575 static Image::AutoPtr open(
const std::wstring& wpath,
bool useCurl =
true);
617 #ifdef EXV_UNICODE_PATH
622 static Image::AutoPtr create(
int type,
const std::wstring& wpath);
654 static int getType(
const std::string& path);
655 #ifdef EXV_UNICODE_PATH
660 static int getType(
const std::wstring& wpath);
669 static int getType(
const byte* data,
long size);
707 static bool checkType(
int type,
BasicIo& io,
bool advance);
728 #endif // #ifndef IMAGE_HPP_
virtual DataBuf * iccProfile()
return iccProfile
Definition: image.hpp:240
EXIV2LIB_DEPRECATED_EXPORT Image::AutoPtr newMkvInstance(BasicIo::AutoPtr io, bool create)
Create a new MatroskaVideo instance and return an auto-pointer to it. Caller owns the returned object...
const int sr2
SR2 image type (see class TiffImage)
Definition: tiffimage.hpp:44
virtual int open()=0
Open the IO source using the default access mode. The default mode should allow for reading and writi...
static AccessMode checkMode(int type, MetadataId metadataId)
Returns the access mode or supported metadata functions for an image type and a metadata type.
Definition: image.cpp:803
Provides binary IO on blocks of memory by implementing the BasicIo interface. A copy-on-write impleme...
Definition: basicio.hpp:540
const int pgf
PGF image type (see class PgfImage)
Definition: pgfimage.hpp:40
void clear()
Delete all Exifdatum instances resulting in an empty container. Note that this also removes thumbnail...
Definition: exif.cpp:611
const int crw
CRW image type (see class CrwImage)
Definition: crwimage.hpp:52
const int xmp
XMP sidecar files (see class XmpSidecar)
Definition: xmpsidecar.hpp:38
EXIV2API bool isXmpType(BasicIo &iIo, bool advance)
Check if the file iIo is an XMP sidecar file.
Definition: xmpsidecar.cpp:203
std::string xmpPacket_
XMP packet.
Definition: image.hpp:490
std::string filter_
Filter.
Definition: image.hpp:54
EXIV2API bool isOrfType(BasicIo &iIo, bool advance)
Check if the file iIo is an ORF image.
Definition: orfimage.cpp:216
const int exv
EXV image type (see class ExvImage)
Definition: jpgimage.hpp:40
EXIV2LIB_DEPRECATED_EXPORT bool isQTimeType(BasicIo &iIo, bool advance)
Check if the file iIo is a Quick Time Video.
virtual int error() const =0
Returns 0 if the IO source is in a valid state, otherwise nonzero.
byte * pData_
Pointer to the buffer, 0 if none has been allocated.
Definition: types.hpp:258
Nikon makernote tags. References: [1] MakerNote EXIF Tag of the Nikon 990 by Max Lyons [2] Exif fil...
IptcData iptcData_
IPTC data container.
Definition: image.hpp:486
EXIV2API Image::AutoPtr newGifInstance(BasicIo::AutoPtr io, bool create)
Create a new GifImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition: gifimage.cpp:101
@ tiffFloat
TIFF FLOAT type, single precision (4-byte) IEEE format.
Definition: types.hpp:130
virtual void clearIptcData()
Erase any buffered IPTC data. IPTC data is not removed from the actual image until the writeMetadata(...
Definition: image.cpp:636
std::string indent(int32_t d)
indent output for kpsRecursive in printStructure() .
Definition: image_int.cpp:106
Provides binary file IO by implementing the BasicIo interface.
Definition: basicio.hpp:296
virtual int pixelWidth() const
Return the pixel width of the image.
Definition: image.cpp:717
Image(int imageType, uint16_t supportedMetadata, BasicIo::AutoPtr io)
Constructor taking the image type, a bitmap of the supported metadata types and an auto-pointer that ...
Definition: image.cpp:167
Utility class that closes a BasicIo instance upon destruction. Meant to be used as a stack variable i...
Definition: basicio.hpp:264
Encoding and decoding of Exif data.
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Position
Seek starting positions.
Definition: basicio.hpp:61
Returns an Image instance of the specified type.
Definition: image.hpp:531
EXIV2LIB_DEPRECATED_EXPORT Image::AutoPtr newEpsInstance(BasicIo::AutoPtr io, bool create)
Create a new EpsImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition: epsimage.cpp:1154
const int tiff
TIFF image type (see class TiffImage)
Definition: tiffimage.hpp:39
Windows Bitmap (BMP) image.
EXIV2API bool isCr2Type(BasicIo &iIo, bool advance)
Check if the file iIo is a CR2 image.
Definition: cr2image.cpp:212
NativePreviewList nativePreviews_
list of native previews
Definition: image.hpp:493
static bool checkType(int type, BasicIo &io, bool advance)
Determine if the content of io is an image of type.
Definition: image.cpp:830
uint32_t width_
Width.
Definition: image.hpp:52
const char * typeName(uint16_t tag) const
Return tag type for given tag id.
Definition: image.cpp:323
bool isBigEndianPlatform()
is the host platform bigEndian
Definition: image.cpp:251
@ undefined
Exif UNDEFINED type, an 8-bit byte that may contain anything.
Definition: types.hpp:126
EXIV2API bool isGifType(BasicIo &iIo, bool advance)
Check if the file iIo is a GIF image.
Definition: gifimage.cpp:111
TypeId getType()
Template to determine the TypeId for a type T.
@ omitAllFormatting
Omit all formatting whitespace.
Definition: xmp_exiv2.hpp:278
const int nef
NEF image type (see class TiffImage)
Definition: tiffimage.hpp:41
const int cr2
CR2 image type (see class Cr2Image)
Definition: cr2image.hpp:45
std::string comment_
User comment.
Definition: image.hpp:489
EXIV2LIB_DEPRECATED_EXPORT bool isAsfType(BasicIo &iIo, bool advance)
Check if the file iIo is a Windows Asf Video.
const int bmp
Windows bitmap (bmp) image type (see class BmpImage)
Definition: bmpimage.hpp:45
@ signedLongLong
Exif LONG LONG type, 64-bit (8-byte) signed integer.
Definition: types.hpp:134
@ signedShort
Exif SSHORT type, a 16-bit (2-byte) signed (twos-complement) integer.
Definition: types.hpp:127
EXIV2API bool isExvType(BasicIo &iIo, bool advance)
Check if the file iIo is an EXV file.
Definition: jpgimage.cpp:1406
Slice< T > makeSlice(T &cont, size_t begin, size_t end)
Return a new slice with the given bounds.
Definition: slice.hpp:665
@ comment
Exiv2 type for the Exif user comment.
Definition: types.hpp:139
void clear()
Delete all Xmpdatum instances resulting in an empty container.
Definition: xmp.cpp:508
@ asciiString
Exif ASCII type, 8-bit byte.
Definition: types.hpp:121
Native preview information. This is meant to be used only by the PreviewManager.
Definition: image.hpp:49
virtual std::string comment() const
Return a copy of the image comment. May be an empty string.
Definition: image.cpp:742
const NativePreviewList & nativePreviews() const
Return list of native previews. This is meant to be used only by the PreviewManager.
Definition: image.cpp:762
EXIV2API std::string strError()
Return a system error message and the error code (errno). See strerror(3).
Definition: futils.cpp:316
const int mrw
MRW image type (see class MrwImage)
Definition: mrwimage.hpp:38
virtual int pixelHeight() const
Return the pixel height of the image.
Definition: image.cpp:722
virtual void setComment(const std::string &comment)
Set the image comment. The new comment is not written to the image until the writeMetadata() method i...
Definition: image.cpp:687
const int gif
GIF image type (see class GifImage)
Definition: gifimage.hpp:38
EXIV2API bool isMrwType(BasicIo &iIo, bool advance)
Check if the file iIo is a MRW image.
Definition: mrwimage.cpp:165
const TagInfo * iopTagList()
Return read-only list of built-in IOP tags.
Definition: tags_int.cpp:2419
const int raf
RAF image type (see class RafImage)
Definition: rafimage.hpp:43
Provides the http read/write access for the RemoteIo.
Definition: basicio.hpp:1015
EXIV2API bool isRw2Type(BasicIo &iIo, bool advance)
Check if the file iIo is a RW2 image.
Definition: rw2image.cpp:250
ExifData exifData_
Exif data container.
Definition: image.hpp:485
EXIV2API Image::AutoPtr newTiffInstance(BasicIo::AutoPtr io, bool create)
Create a new TiffImage instance and return an auto-pointer to it. Caller owns the returned object and...
Definition: tiffimage.cpp:317
void printIFDStructure(BasicIo &io, std::ostream &out, Exiv2::PrintStructureOption option, uint32_t start, bool bSwap, char c, int depth)
Print out the structure of a TIFF IFD.
Definition: image.cpp:352
EXIV2API bool isPgfType(BasicIo &iIo, bool advance)
Check if the file iIo is a PGF image.
Definition: pgfimage.cpp:327
EXIV2API bool isTiffType(BasicIo &iIo, bool advance)
Check if the file iIo is a TIFF image.
Definition: tiffimage.cpp:326
@ unsignedLong
Exif LONG type, 32-bit (4-byte) unsigned integer.
Definition: types.hpp:123
An Image subclass to support ASF video files.
@ tiffIfd8
TIFF IFD type, 64-bit (8-byte) unsigned integer.
Definition: types.hpp:135
virtual void setIptcData(const IptcData &iptcData)
Assign new IPTC data. The new IPTC data is not written to the image until the writeMetadata() method ...
Definition: image.cpp:641
EXIV2API bool isTgaType(BasicIo &iIo, bool advance)
Check if the file iIo is a Targa v2 image.
Definition: tgaimage.cpp:133
void setTypeSupported(int imageType, uint16_t supportedMetadata)
set type support for this image format
Definition: image.hpp:471
binaryToStringHelper< T > binaryToString(const Slice< T > sl)
format binary data for display in Image::printStructure()
Definition: image_int.hpp:118
@ tiffDouble
TIFF DOUBLE type, double precision (8-byte) IEEE format.
Definition: types.hpp:131
void clear()
Delete all Iptcdatum instances resulting in an empty container.
Definition: iptc.hpp:215
virtual bool iccProfileDefined()
Erase iccProfile. the profile is not removed from the actual image until the writeMetadata() method i...
Definition: image.hpp:235
int pixelHeight_
image pixel height
Definition: image.hpp:492
EXIV2API bool isPsdType(BasicIo &iIo, bool advance)
Check if the file iIo is a Photoshop image.
Definition: psdimage.cpp:696
const int psd
Photoshop (PSD) image type (see class PsdImage)
Definition: psdimage.hpp:38
EXIV2API std::string pathOfFileUrl(const std::string &url)
Get the path of file URL.
Definition: futils.cpp:301
EXIV2API Image::AutoPtr newJpegInstance(BasicIo::AutoPtr io, bool create)
Create a new JpegImage instance and return an auto-pointer to it. Caller owns the returned object and...
Definition: jpgimage.cpp:1345
EXIV2API bool isWebPType(BasicIo &iIo, bool advance)
Check if the file iIo is a WebP Video.
Definition: webpimage.cpp:743
EXIV2LIB_DEPRECATED_EXPORT Image::AutoPtr newRiffInstance(BasicIo::AutoPtr io, bool create)
Create a new RiffVideo instance and return an auto-pointer to it. Caller owns the returned object and...
virtual void clearMetadata()
Erase all buffered metadata. Metadata is not removed from the actual image until the writeMetadata() ...
Definition: image.cpp:570
EXIV2API Image::AutoPtr newCr2Instance(BasicIo::AutoPtr io, bool create)
Create a new Cr2Image instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition: cr2image.cpp:203
virtual void clearXmpData()
Erase any buffered XMP data. XMP data is not removed from the actual image until the writeMetadata() ...
Definition: image.cpp:661
static const TagInfo * tagList()
Return read-only list of built-in Nikon1 tags.
Definition: nikonmn_int.cpp:266
EXIV2LIB_DEPRECATED_EXPORT Image::AutoPtr newQTimeInstance(BasicIo::AutoPtr io, bool create)
Create a new QuicktimeVideo instance and return an auto-pointer to it. Caller owns the returned objec...
const int asf
Treating asf as an image type>
Definition: asfvideo.hpp:43
@ tiffIfd
TIFF IFD type, 32-bit (4-byte) unsigned integer.
Definition: types.hpp:132
long position_
Position.
Definition: image.hpp:50
virtual void setMetadata(const Image &image)
Copy all existing metadata from source Image. The data is copied into internal buffers and is not wri...
Definition: image.cpp:606
static Image::AutoPtr open(const std::string &path, bool useCurl=true)
Create an Image subclass of the appropriate type by reading the specified file. Image type is derived...
Definition: image.cpp:922
uint32_t size_
Size.
Definition: image.hpp:51
const int jp2
JPEG-2000 image type.
Definition: jp2image.hpp:45
MetadataId
An identifier for each type of metadata.
Definition: types.hpp:108
void free()
Free the internal buffer and reset the size to 0.
Definition: types.cpp:175
virtual void clearComment()
Erase any buffered comment. Comment is not removed from the actual image until the writeMetadata() me...
Definition: image.cpp:682
EXIV2API Image::AutoPtr newExvInstance(BasicIo::AutoPtr io, bool create)
Create a new ExvImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition: jpgimage.cpp:1398
bool isLittleEndianPlatform()
is the host platform littleEndian
Definition: image.cpp:260
std::string stringFormat(const char *format,...)
format a string in the pattern of sprintf .
Definition: image_int.cpp:32
@ unsignedRational
Exif RATIONAL type, two LONGs: numerator and denumerator of a fraction.
Definition: types.hpp:124
bool supportsMetadata(MetadataId metadataId) const
Check if image supports a particular type of metadata. This method is deprecated. Use checkMode() ins...
Definition: image.cpp:774
void setByteOrder(ByteOrder byteOrder)
Set the byte order to encode the Exif metadata in.
Definition: image.cpp:707
static int getType(const std::string &path)
Returns the image type of the provided file.
Definition: image.cpp:839
ByteOrder byteOrder() const
Return the byte order in which the Exif metadata of the image is encoded. Initially,...
Definition: image.cpp:712
EXIV2API Image::AutoPtr newRafInstance(BasicIo::AutoPtr io, bool create)
Create a new RafImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition: rafimage.cpp:399
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:194
static void printStructure(std::ostream &out, const Slice< byte * > &bytes, uint32_t depth)
dump iptc formatted binary data (used by printStructure kpsRecursive)
Definition: iptc.cpp:347
EXIV2API Image::AutoPtr newOrfInstance(BasicIo::AutoPtr io, bool create)
Create a new OrfImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition: orfimage.cpp:207
EXIV2API void append(Exiv2::Blob &blob, const byte *buf, uint32_t len)
Append len bytes pointed to by buf to blob.
Definition: image.cpp:1013
Image::AutoPtr(* NewInstanceFct)(BasicIo::AutoPtr io, bool create)
Type for function pointer that creates new Image instances.
Definition: image.hpp:522
int pixelWidth_
image pixel width
Definition: image.hpp:491
bool good() const
Check if the Image instance is valid. Use after object construction.
Definition: image.cpp:767
EXIV2LIB_DEPRECATED_EXPORT bool isMkvType(BasicIo &iIo, bool advance)
Check if the file iIo is a Matroska Video.
void printTiffStructure(BasicIo &io, std::ostream &out, PrintStructureOption option, int depth, size_t offset=0)
Print out the structure of image file.
Definition: image.cpp:552
static BasicIo::AutoPtr createIo(const std::string &path, bool useCurl=true)
Create the appropriate class type implemented BasicIo based on the protocol of the input.
Definition: image.cpp:871
EXIV2LIB_DEPRECATED_EXPORT bool isEpsType(BasicIo &iIo, bool advance)
Check if the file iIo is a EPS image.
Definition: epsimage.cpp:1163
EXIV2API Protocol fileProtocol(const std::string &path)
Return the protocol of the path.
Definition: futils.cpp:221
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:193
@ unsignedByte
Exif BYTE type, 8-bit unsigned integer.
Definition: types.hpp:120
const int qtime
Treating qtime as an image type>
Definition: quicktimevideo.hpp:39
@ useCompactFormat
Use a compact form of RDF.
Definition: xmp_exiv2.hpp:274
EXIV2API bool isRafType(BasicIo &iIo, bool advance)
Check if the file iIo is a RAF image.
Definition: rafimage.cpp:408
@ signedByte
Exif SBYTE type, an 8-bit signed (twos-complement) integer.
Definition: types.hpp:125
long count() const
Get the number of metadata entries.
Definition: xmp.cpp:533
long size_
The current size of the buffer.
Definition: types.hpp:260
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:1000
EXIV2API bool isBmpType(BasicIo &iIo, bool advance)
Check if the file iIo is a Windows Bitmap image.
Definition: bmpimage.cpp:132
const T * find(T(&src)[N], const K &key)
Find an element that matches key in the array src.
Definition: types.hpp:497
EXIV2LIB_DEPRECATED_EXPORT Image::AutoPtr newAsfInstance(BasicIo::AutoPtr io, bool create)
Create a new AsfVideo instance and return an auto-pointer to it. Caller owns the returned object and ...
const int mkv
Treating mkv as an image type>
Definition: matroskavideo.hpp:38
virtual DataBuf read(long rcount)=0
Read data from the IO source. Reading starts at the current IO position and the position is advanced ...
EXIV2LIB_DEPRECATED_EXPORT bool isRiffType(BasicIo &iIo, bool advance)
Check if the file iIo is a Riff Video.
Protocol
the collection of protocols.
Definition: futils.hpp:38
@ unsignedShort
Exif SHORT type, 16-bit (2-byte) unsigned integer.
Definition: types.hpp:122
int imageType() const
set type support for this image format
Definition: image.hpp:480
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
const TagInfo * mpfTagList()
Return read-only list of built-in mfp Tags http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/MPF....
Definition: tags_int.cpp:2386
A container for XMP data. This is a top-level class of the Exiv2 library.
Definition: xmp_exiv2.hpp:166
virtual void clearIccProfile()
Erase iccProfile. the profile is not removed from the actual image until the writeMetadata() method i...
Definition: image.cpp:702
@ signedLong
Exif SLONG type, a 32-bit (4-byte) signed (twos-complement) integer.
Definition: types.hpp:128
EXIV2API Image::AutoPtr newWebPInstance(BasicIo::AutoPtr io, bool create)
Create a new WebPImage instance and return an auto-pointer to it. Caller owns the returned object and...
Definition: webpimage.cpp:734
virtual BasicIo & io() const
Return a reference to the BasicIo instance being used for Io.
Definition: image.cpp:752
const int pef
PEF image type (see class TiffImage)
Definition: tiffimage.hpp:42
const int none
Not an image.
Definition: image.hpp:45
const int webp
Treating webp as an image type>
Definition: webpimage.hpp:38
virtual void clearXmpPacket()
Erase the buffered XMP packet. XMP data is not removed from the actual image until the writeMetadata(...
Definition: image.cpp:646
virtual std::string path() const =0
Return the path to the IO resource. Often used to form comprehensive error messages where only a Basi...
EXIV2API Image::AutoPtr newPngInstance(BasicIo::AutoPtr io, bool create)
Create a new PngImage instance and return an auto-pointer to it. Caller owns the returned object and ...
@ signedRational
Exif SRATIONAL type, two SLONGs: numerator and denumerator of a fraction.
Definition: types.hpp:129
EXIV2API Image::AutoPtr newPgfInstance(BasicIo::AutoPtr io, bool create)
Create a new PgfImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition: pgfimage.cpp:317
uint32_t height_
Height.
Definition: image.hpp:53
Tag information.
Definition: tags.hpp:74
const TagInfo * exifTagList()
Return read-only list of built-in Exif IFD tags.
Definition: tags_int.cpp:2096
const int orf
ORF image type (see class OrfImage)
Definition: orfimage.hpp:38
bool operator==(const TagDetails &td, const LensTypeAndFocalLengthAndMaxAperture <fl)
Compare tag details with a lens entry.
Definition: canonmn_int.cpp:2820
const int jpeg
JPEG image type (see class JpegImage)
Definition: jpgimage.hpp:39
virtual void setExifData(const ExifData &exifData)
Assign new Exif data. The new Exif data is not written to the image until the writeMetadata() method ...
Definition: image.cpp:631
const TagInfo * gpsTagList()
Return read-only list of built-in GPS tags.
Definition: tags_int.cpp:2316
BasicIo::AutoPtr io_
Image data IO pointer.
Definition: image.hpp:484
virtual size_t size() const =0
Get the current size of the IO source in bytes.
ByteOrder
Type to express the byte order (little or big endian)
Definition: types.hpp:102
DataBuf iccProfile_
ICC buffer (binary data)
Definition: image.hpp:488
EXIV2API Image::AutoPtr newRw2Instance(BasicIo::AutoPtr io, bool create)
Create a new Rw2Image instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition: rw2image.cpp:241
AccessMode
An identifier for each mode of metadata support.
Definition: types.hpp:111
Slice< container > makeSliceUntil(container &cont, size_t end)
Return a new slice spanning until end.
Definition: slice.hpp:702
const int dng
DNG image type (see class TiffImage)
Definition: tiffimage.hpp:40
const TagInfo * ifdTagList()
Return read-only list of built-in IFD0/1 tags.
Definition: tags_int.cpp:1709
std::auto_ptr< Image > AutoPtr
Image auto_ptr type.
Definition: image.hpp:81
virtual std::string & xmpPacket()
Return a modifiable reference to the raw XMP packet.
Definition: image.cpp:595
EXIV2API Image::AutoPtr newBmpInstance(BasicIo::AutoPtr io, bool create)
Create a new BmpImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition: bmpimage.cpp:123
AccessMode checkMode(MetadataId metadataId) const
Returns the access mode, i.e., the metadata functions, which this image supports for the metadata typ...
Definition: image.cpp:779
EXIV2API bool isCrwType(BasicIo &iIo, bool advance)
Check if the file iIo is a CRW image.
Definition: crwimage.cpp:195
const int riff
Treating riff as an image type>
Definition: riffvideo.hpp:39
T add(T summand_1, T summand_2)
Safe addition, throws an exception on overflow.
Definition: safe_op.hpp:288
std::auto_ptr< BasicIo > AutoPtr
BasicIo auto_ptr type.
Definition: basicio.hpp:58
EPS image. References: [1] Adobe PostScript Language Document Structuring Conventions Specification...
bool writeXmpFromPacket() const
Return the flag indicating the source when writing XMP metadata.
Definition: image.cpp:757
Provides binary IO for the data from stdin and data uri path.
Definition: basicio.hpp:761
BasicError< char > Error
Error class used for exceptions (std::string based)
Definition: error.hpp:324
EXIV2API bool isJpegType(BasicIo &iIo, bool advance)
Check if the file iIo is a JPEG image.
Definition: jpgimage.cpp:1354
A container for IPTC data. This is a top-level class of the Exiv2 library.
Definition: iptc.hpp:170
virtual void setXmpPacket(const std::string &xmpPacket)
Assign a raw XMP packet. The new XMP packet is not written to the image until the writeMetadata() met...
Definition: image.cpp:652
std::vector< NativePreview > NativePreviewList
List of native previews. This is meant to be used only by the PreviewManager.
Definition: image.hpp:59
@ unsignedLongLong
Exif LONG LONG type, 64-bit (8-byte) unsigned integer.
Definition: types.hpp:133
const int tga
Truevision TARGA (tga) image type (see class TgaImage)
Definition: tgaimage.hpp:38
const int arw
ARW image type (see class TiffImage)
Definition: tiffimage.hpp:43
virtual void clearExifData()
Erase any buffered Exif data. Exif data is not removed from the actual image until the writeMetadata(...
Definition: image.cpp:626
const int rw2
RW2 image type (see class Rw2Image)
Definition: rw2image.hpp:38
const std::string & tagName(uint16_t tag)
Return tag name for given tag id.
Definition: image.cpp:784
uint16_t tag_
Tag.
Definition: tags.hpp:87
EXIV2API Image::AutoPtr newJp2Instance(BasicIo::AutoPtr io, bool create)
Create a new Jp2Image instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition: jp2image.cpp:975
EXIV2API Image::AutoPtr newPsdInstance(BasicIo::AutoPtr io, bool create)
Create a new PsdImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition: psdimage.cpp:686
PrintStructureOption
Options for printStructure.
Definition: image.hpp:64
#define EXV_ERROR
Shorthand for a temp error log message object and return its ostringstream.
Definition: error.hpp:150
virtual long tell() const =0
Get the current IO position.
virtual int seek(long offset, Position pos)=0
Move the current IO position.
ErrorCode
Complete list of all Exiv2 error codes.
Definition: error.hpp:191
const int png
PNG image type (see class PngImage)
Definition: pngimage.hpp:40
EXIV2API bool isJp2Type(BasicIo &iIo, bool advance)
Check if the file iIo is a JPEG-2000 image.
Definition: jp2image.cpp:985
An interface for simple binary IO.
Definition: basicio.hpp:55
static Image::AutoPtr create(int type, const std::string &path)
Create an Image subclass of the requested type by creating a new image file. If the file already exis...
Definition: image.cpp:959
virtual int close()
Flush and unwritten data and close the file . It is safe to call close on an already closed instance.
Definition: basicio.cpp:981
XmpData xmpData_
XMP data container.
Definition: image.hpp:487
int open(const std::string &mode)
Open the file using using the specified mode.
Definition: basicio.cpp:958
virtual XmpData & xmpData()
Returns an XmpData instance containing currently buffered XMP data.
Definition: image.cpp:590
Abstract base class defining the interface for an image. This is the top-level interface to the Exiv2...
Definition: image.hpp:78
EXIV2API Image::AutoPtr newTgaInstance(BasicIo::AutoPtr io, bool create)
Create a new TgaImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition: tgaimage.cpp:123
EXIV2API Image::AutoPtr newMrwInstance(BasicIo::AutoPtr io, bool create)
Create a new MrwImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition: mrwimage.cpp:156
virtual void setIccProfile(DataBuf &iccProfile, bool bTestValid=true)
Set the image iccProfile. The new profile is not written to the image until the writeMetadata() metho...
Definition: image.cpp:692
std::string mimeType_
MIME type.
Definition: image.hpp:55
bool(* IsThisTypeFct)(BasicIo &iIo, bool advance)
Type for function pointer that checks image types.
Definition: image.hpp:524
const int srw
SRW image type (see class TiffImage)
Definition: tiffimage.hpp:45
EXIV2API Image::AutoPtr newCrwInstance(BasicIo::AutoPtr io, bool create)
Create a new CrwImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition: crwimage.cpp:186
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:887
virtual IptcData & iptcData()
Returns an IptcData instance containing currently buffered IPTC data.
Definition: image.cpp:585
EXIV2API uint32_t getULong(const byte *buf, ByteOrder byteOrder)
Read a 4 byte unsigned long value from the data buffer.
Definition: types.cpp:278
virtual ~Image()
Virtual Destructor.
Definition: image.cpp:186
Error class for exceptions, log message class.
virtual void setXmpData(const XmpData &xmpData)
Assign new XMP data. The new XMP data is not written to the image until the writeMetadata() method is...
Definition: image.cpp:667
virtual ExifData & exifData()
Returns an ExifData instance containing currently buffered Exif data.
Definition: image.cpp:580
std::vector< byte > Blob
Container for binary data.
Definition: types.hpp:151
Encoding and decoding of IPTC data.
const int eps
EPS image type.
Definition: epsimage.hpp:53
virtual void printStructure(std::ostream &out, PrintStructureOption option=kpsNone, int depth=0)
Print out the structure of image file.
Definition: image.cpp:190
A container for Exif data. This is a top-level class of the Exiv2 library. The container holds Exifda...
Definition: exif.hpp:434
EXIV2API bool isPngType(BasicIo &iIo, bool advance)
Check if the file iIo is a PNG image.