Exiv2
jpgimage.hpp
1 // ***************************************************************** -*- C++ -*-
2 /*
3  * Copyright (C) 2004-2021 Exiv2 authors
4  * This program is part of the Exiv2 distribution.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef JPGIMAGE_HPP_
22 #define JPGIMAGE_HPP_
23 
24 // *****************************************************************************
25 #include "exiv2lib_export.h"
26 
27 // included header files
28 #include "image.hpp"
29 
30 // *****************************************************************************
31 // namespace extensions
32 namespace Exiv2 {
33 
34 // *****************************************************************************
35 // class definitions
36 
37  // Supported JPEG image formats
38  namespace ImageType {
39  const int jpeg = 1;
40  const int exv = 2;
41  }
42 
47  struct EXIV2API Photoshop {
48  // Todo: Public for now
49  static const char ps3Id_[];
50  static const char* irbId_[];
51  static const char bimId_[];
52  static const uint16_t iptc_;
53  static const uint16_t preview_;
54 
63  static bool isIrb(const byte* pPsData,
64  long sizePsData);
73  static bool valid(const byte* pPsData,
74  long sizePsData);
92  static int locateIrb(const byte *pPsData,
93  long sizePsData,
94  uint16_t psTag,
95  const byte **record,
96  uint32_t *const sizeHdr,
97  uint32_t *const sizeData);
101  static int locateIptcIrb(const byte *pPsData,
102  long sizePsData,
103  const byte **record,
104  uint32_t *const sizeHdr,
105  uint32_t *const sizeData);
109  static int locatePreviewIrb(const byte *pPsData,
110  long sizePsData,
111  const byte **record,
112  uint32_t *const sizeHdr,
113  uint32_t *const sizeData);
123  static DataBuf setIptcIrb(const byte* pPsData,
124  long sizePsData,
125  const IptcData& iptcData);
126 
127  }; // class Photoshop
128 
132  class EXIV2API JpegBase : public Image {
133  public:
135 
136  void readMetadata();
137  void writeMetadata();
138 
145  void printStructure(std::ostream& out, PrintStructureOption option,int depth);
147 
148  protected:
150 
151 
169  JpegBase(int type,
170  BasicIo::AutoPtr io,
171  bool create,
172  const byte initData[],
173  long dataSize);
175 
177 
178 
197  virtual bool isThisType(BasicIo& iIo, bool advance) const =0;
199 
201 
202 
208  virtual int writeHeader(BasicIo& oIo) const =0;
210 
211  // Constant Data
212  static const byte dht_;
213  static const byte dqt_;
214  static const byte dri_;
215  static const byte sos_;
216  static const byte eoi_;
217  static const byte app0_;
218  static const byte app1_;
219  static const byte app2_;
220  static const byte app13_;
221  static const byte com_;
222  static const byte sof0_;
223  static const byte sof1_;
224  static const byte sof2_;
225  static const byte sof3_;
226  static const byte sof5_;
227  static const byte sof6_;
228  static const byte sof7_;
229  static const byte sof9_;
230  static const byte sof10_;
231  static const byte sof11_;
232  static const byte sof13_;
233  static const byte sof14_;
234  static const byte sof15_;
235  static const char exifId_[];
236  static const char jfifId_[];
237  static const char xmpId_[];
238  static const char iccId_[];
239 
240  private:
242 
243  JpegBase();
246  JpegBase(const JpegBase& rhs);
248  JpegBase& operator=(const JpegBase& rhs);
250 
252 
253 
260  int initImage(const byte initData[], long dataSize);
268  void doWriteMetadata(BasicIo& oIo);
270 
272 
273 
281  int advanceToMarker() const;
283 
284  }; // class JpegBase
285 
289  class EXIV2API JpegImage : public JpegBase {
290  friend EXIV2API bool isJpegType(BasicIo& iIo, bool advance);
291  public:
293 
294 
309  JpegImage(BasicIo::AutoPtr io, bool create);
311 
313  std::string mimeType() const;
315 
316  protected:
318 
319  bool isThisType(BasicIo& iIo, bool advance) const;
321 
323 
331  int writeHeader(BasicIo& oIo) const;
333 
334  private:
335  // Constant data
336  static const byte soi_; // SOI marker
337  static const byte blank_[]; // Minimal Jpeg image
338 
339  // NOT Implemented
341  JpegImage();
343  JpegImage(const JpegImage& rhs);
345  JpegImage& operator=(const JpegImage& rhs);
346 
347  }; // class JpegImage
348 
350  class EXIV2API ExvImage : public JpegBase {
351  friend EXIV2API bool isExvType(BasicIo& iIo, bool advance);
352  public:
354 
355 
370  ExvImage(BasicIo::AutoPtr io, bool create);
372 
374  std::string mimeType() const;
376 
377  protected:
379 
380  bool isThisType(BasicIo& iIo, bool advance) const;
382 
384  int writeHeader(BasicIo& oIo) const;
386 
387  private:
388  // Constant data
389  static const char exiv2Id_[]; // EXV identifier
390  static const byte blank_[]; // Minimal exiv2 file
391 
392  // NOT Implemented
394  ExvImage();
396  ExvImage(const ExvImage& rhs);
398  ExvImage& operator=(const ExvImage& rhs);
399 
400  }; // class ExvImage
401 
402 // *****************************************************************************
403 // template, inline and free functions
404 
405  // These could be static private functions on Image subclasses but then
406  // ImageFactory needs to be made a friend.
412  EXIV2API Image::AutoPtr newJpegInstance(BasicIo::AutoPtr io, bool create);
414  EXIV2API bool isJpegType(BasicIo& iIo, bool advance);
420  EXIV2API Image::AutoPtr newExvInstance(BasicIo::AutoPtr io, bool create);
422  EXIV2API bool isExvType(BasicIo& iIo, bool advance);
423 
424 } // namespace Exiv2
425 
426 #endif // #ifndef JPGIMAGE_HPP_
Exiv2::JpegBase::com_
static const byte com_
JPEG Comment marker.
Definition: jpgimage.hpp:221
Exiv2::MemIo
Provides binary IO on blocks of memory by implementing the BasicIo interface. A copy-on-write impleme...
Definition: basicio.hpp:540
Exiv2::ExifData::clear
void clear()
Delete all Exifdatum instances resulting in an empty container. Note that this also removes thumbnail...
Definition: exif.cpp:611
Exiv2::Photoshop::preview_
static const uint16_t preview_
Photoshop preview marker
Definition: jpgimage.hpp:53
Exiv2::JpegImage::isJpegType
friend EXIV2API bool isJpegType(BasicIo &iIo, bool advance)
Check if the file iIo is a JPEG image.
Definition: jpgimage.cpp:1354
Exiv2::JpegBase::sof3_
static const byte sof3_
JPEG Start-Of-Frame marker.
Definition: jpgimage.hpp:225
Exiv2::Image::xmpPacket_
std::string xmpPacket_
XMP packet.
Definition: image.hpp:490
Exiv2::BasicIo::isopen
virtual bool isopen() const =0
Returns true if the IO source is open, otherwise false.
Exiv2::ImageType::exv
const int exv
EXV image type (see class ExvImage)
Definition: jpgimage.hpp:40
Exiv2::BasicIo::error
virtual int error() const =0
Returns 0 if the IO source is in a valid state, otherwise nonzero.
Exiv2::DataBuf::pData_
byte * pData_
Pointer to the buffer, 0 if none has been allocated.
Definition: types.hpp:258
Exiv2::Image::iptcData_
IptcData iptcData_
IPTC data container.
Definition: image.hpp:486
Exiv2::JpegBase::dht_
static const byte dht_
JPEG DHT marker.
Definition: jpgimage.hpp:212
Exiv2::JpegBase::dqt_
static const byte dqt_
JPEG DQT marker.
Definition: jpgimage.hpp:213
Exiv2::JpegBase::writeMetadata
void writeMetadata()
Write metadata back to the image.
Definition: jpgimage.cpp:872
Exiv2::IoCloser
Utility class that closes a BasicIo instance upon destruction. Meant to be used as a stack variable i...
Definition: basicio.hpp:264
Exiv2::BasicIo::Position
Position
Seek starting positions.
Definition: basicio.hpp:61
Exiv2::Photoshop::locateIrb
static int locateIrb(const byte *pPsData, long sizePsData, uint16_t psTag, const byte **record, uint32_t *const sizeHdr, uint32_t *const sizeData)
Locates the data for a Photoshop tag in a Photoshop formated memory buffer. Operates on raw data to s...
Definition: jpgimage.cpp:152
Exiv2::JpegBase::isThisType
virtual bool isThisType(BasicIo &iIo, bool advance) const =0
Determine if the content of the BasicIo instance is of the type supported by this class.
Exiv2::JpegBase::app2_
static const byte app2_
JPEG APP2 marker.
Definition: jpgimage.hpp:219
Exiv2::JpegBase::app13_
static const byte app13_
JPEG APP13 marker.
Definition: jpgimage.hpp:220
Exiv2::JpegBase::sof0_
static const byte sof0_
JPEG Start-Of-Frame marker.
Definition: jpgimage.hpp:222
Exiv2::XmpParser::omitAllFormatting
@ omitAllFormatting
Omit all formatting whitespace.
Definition: xmp_exiv2.hpp:278
Exiv2::Image::comment_
std::string comment_
User comment.
Definition: image.hpp:489
Exiv2::IptcParser::decode
static int decode(IptcData &iptcData, const byte *pData, uint32_t size)
Decode binary IPTC data in IPTC IIM4 format from a buffer pData of length size to the provided metada...
Definition: iptc.cpp:433
Exiv2::JpegBase::app0_
static const byte app0_
JPEG APP0 marker.
Definition: jpgimage.hpp:217
Exiv2::Photoshop::locateIptcIrb
static int locateIptcIrb(const byte *pPsData, long sizePsData, const byte **record, uint32_t *const sizeHdr, uint32_t *const sizeData)
Forwards to locateIrb() with psTag = iptc_.
Definition: jpgimage.cpp:229
Exiv2::JpegBase::printStructure
void printStructure(std::ostream &out, PrintStructureOption option, int depth)
Print out the structure of image file.
Definition: jpgimage.cpp:557
Exiv2::JpegBase::sof14_
static const byte sof14_
JPEG Start-Of-Frame marker.
Definition: jpgimage.hpp:233
Exiv2::isExvType
EXIV2API bool isExvType(BasicIo &iIo, bool advance)
Check if the file iIo is an EXV file.
Definition: jpgimage.cpp:1406
Exiv2::makeSlice
Slice< T > makeSlice(T &cont, size_t begin, size_t end)
Return a new slice with the given bounds.
Definition: slice.hpp:665
Exiv2::JpegBase::sof6_
static const byte sof6_
JPEG Start-Of-Frame marker.
Definition: jpgimage.hpp:227
Exiv2::JpegBase::app1_
static const byte app1_
JPEG APP1 marker.
Definition: jpgimage.hpp:218
Exiv2::strError
EXIV2API std::string strError()
Return a system error message and the error code (errno). See strerror(3).
Definition: futils.cpp:316
Exiv2::ExvImage::mimeType
std::string mimeType() const
Return the MIME type of the image.
Definition: jpgimage.cpp:1376
Exiv2::JpegBase::exifId_
static const char exifId_[]
Exif identifier.
Definition: jpgimage.hpp:235
Exiv2::Image::exifData_
ExifData exifData_
Exif data container.
Definition: image.hpp:485
Exiv2::JpegBase::sof5_
static const byte sof5_
JPEG Start-Of-Frame marker.
Definition: jpgimage.hpp:226
Exiv2::Internal::binaryToString
binaryToStringHelper< T > binaryToString(const Slice< T > sl)
format binary data for display in Image::printStructure()
Definition: image_int.hpp:118
Exiv2::IptcData::clear
void clear()
Delete all Iptcdatum instances resulting in an empty container.
Definition: iptc.hpp:215
Exiv2::Image::iccProfileDefined
virtual bool iccProfileDefined()
Erase iccProfile. the profile is not removed from the actual image until the writeMetadata() method i...
Definition: image.hpp:235
Exiv2::Image::pixelHeight_
int pixelHeight_
image pixel height
Definition: image.hpp:492
Exiv2::Photoshop::valid
static bool valid(const byte *pPsData, long sizePsData)
Validates all IRBs.
Definition: jpgimage.cpp:132
Exiv2::newJpegInstance
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
Exiv2::Image::clearMetadata
virtual void clearMetadata()
Erase all buffered metadata. Metadata is not removed from the actual image until the writeMetadata() ...
Definition: image.cpp:570
Exiv2::JpegBase::sof9_
static const byte sof9_
JPEG Start-Of-Frame marker.
Definition: jpgimage.hpp:229
Exiv2::ExifParser::encode
static WriteMethod encode(Blob &blob, const byte *pData, uint32_t size, ByteOrder byteOrder, const ExifData &exifData)
Encode Exif metadata from the provided metadata to binary Exif format.
Definition: exif.cpp:668
Exiv2::newExvInstance
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
Exiv2::Internal::stringFormat
std::string stringFormat(const char *format,...)
format a string in the pattern of sprintf .
Definition: image_int.cpp:32
Exiv2::Image::setByteOrder
void setByteOrder(ByteOrder byteOrder)
Set the byte order to encode the Exif metadata in.
Definition: image.cpp:707
Exiv2::hexdump
EXIV2API void hexdump(std::ostream &os, const byte *buf, long len, long offset=0)
Print len bytes from buf in hex and ASCII format to the given stream, prefixed with the position in t...
Definition: types.cpp:513
Exiv2::Image::byteOrder
ByteOrder byteOrder() const
Return the byte order in which the Exif metadata of the image is encoded. Initially,...
Definition: image.cpp:712
Exiv2::JpegImage::isThisType
bool isThisType(BasicIo &iIo, bool advance) const
Determine if the content of the BasicIo instance is of the type supported by this class.
Definition: jpgimage.cpp:1340
Exiv2::IptcData::printStructure
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
Exiv2::append
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
Exiv2::Image::pixelWidth_
int pixelWidth_
image pixel width
Definition: image.hpp:491
Exiv2::JpegBase::sof1_
static const byte sof1_
JPEG Start-Of-Frame marker.
Definition: jpgimage.hpp:223
Exiv2::ExvImage::writeHeader
int writeHeader(BasicIo &oIo) const
Writes the image header (aka signature) to the BasicIo instance.
Definition: jpgimage.cpp:1381
Exiv2::Image::printTiffStructure
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
Exiv2::ExvImage::isThisType
bool isThisType(BasicIo &iIo, bool advance) const
Determine if the content of the BasicIo instance is of the type supported by this class.
Definition: jpgimage.cpp:1393
Exiv2::DataBuf
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:193
Exiv2::us2Data
EXIV2API long us2Data(byte *buf, uint16_t s, ByteOrder byteOrder)
Convert an unsigned short to data, write the data to the buffer, return number of bytes written.
Definition: types.cpp:390
Exiv2::JpegImage::writeHeader
int writeHeader(BasicIo &oIo) const
Writes a Jpeg header (aka signature) to the BasicIo instance.
Definition: jpgimage.cpp:1329
Exiv2::XmpParser::useCompactFormat
@ useCompactFormat
Use a compact form of RDF.
Definition: xmp_exiv2.hpp:274
Exiv2::JpegImage::mimeType
std::string mimeType() const
Return the MIME type of the image.
Definition: jpgimage.cpp:1324
Exiv2::BasicIo::putb
virtual int putb(byte data)=0
Write one byte to the IO source. Current IO position is advanced by one byte.
Exiv2::JpegBase::sof2_
static const byte sof2_
JPEG Start-Of-Frame marker.
Definition: jpgimage.hpp:224
Exiv2::XmpData::count
long count() const
Get the number of metadata entries.
Definition: xmp.cpp:533
Exiv2::DataBuf::size_
long size_
The current size of the buffer.
Definition: types.hpp:260
Exiv2::XmpParser::encode
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
Exiv2::BasicIo::eof
virtual bool eof() const =0
Returns true if the IO position has reached the end, otherwise false.
Exiv2::JpegBase::iccId_
static const char iccId_[]
ICC profile identifier.
Definition: jpgimage.hpp:238
Exiv2::BasicIo::read
virtual DataBuf read(long rcount)=0
Read data from the IO source. Reading starts at the current IO position and the position is advanced ...
Exiv2::ExifData::count
long count() const
Get the number of metadata entries.
Definition: exif.hpp:514
Exiv2::JpegImage
Class to access JPEG images.
Definition: jpgimage.hpp:289
Exiv2::JpegBase::eoi_
static const byte eoi_
JPEG EOI marker.
Definition: jpgimage.hpp:216
Exiv2
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
Exiv2::JpegBase::jfifId_
static const char jfifId_[]
JFIF identifier.
Definition: jpgimage.hpp:236
Exiv2::ul2Data
EXIV2API long ul2Data(byte *buf, uint32_t l, ByteOrder byteOrder)
Convert an unsigned long to data, write the data to the buffer, return number of bytes written.
Definition: types.cpp:403
Exiv2::JpegBase
Abstract helper base class to access JPEG images.
Definition: jpgimage.hpp:132
Exiv2::ExifParser::decode
static ByteOrder decode(ExifData &exifData, const byte *pData, uint32_t size)
Decode metadata from a buffer pData of length size with binary Exif data to the provided metadata con...
Definition: exif.cpp:636
Exiv2::JpegBase::readMetadata
void readMetadata()
Read all metadata supported by a specific image format from the image. Before this method is called,...
Definition: jpgimage.cpp:353
Exiv2::JpegBase::sof13_
static const byte sof13_
JPEG Start-Of-Frame marker.
Definition: jpgimage.hpp:232
EXV_WARNING
#define EXV_WARNING
Shorthand for a temp warning log message object and return its ostringstream.
Definition: error.hpp:148
Exiv2::BasicIo::write
virtual long write(const byte *data, long wcount)=0
Write data to the IO source. Current IO position is advanced by the number of bytes written.
Exiv2::ExvImage
Helper class to access Exiv2 files.
Definition: jpgimage.hpp:350
Exiv2::ImageType::jpeg
const int jpeg
JPEG image type (see class JpegImage)
Definition: jpgimage.hpp:39
Exiv2::getUShort
EXIV2API uint16_t getUShort(const byte *buf, ByteOrder byteOrder)
Read a 2 byte unsigned short value from the data buffer.
Definition: types.cpp:273
Exiv2::Image::io_
BasicIo::AutoPtr io_
Image data IO pointer.
Definition: image.hpp:484
Exiv2::ByteOrder
ByteOrder
Type to express the byte order (little or big endian)
Definition: types.hpp:102
Exiv2::Image::iccProfile_
DataBuf iccProfile_
ICC buffer (binary data)
Definition: image.hpp:488
Exiv2::XmpData::usePacket
bool usePacket() const
are we to use the packet?
Definition: xmp_exiv2.hpp:245
Exiv2::Photoshop::irbId_
static const char * irbId_[]
Photoshop IRB markers
Definition: jpgimage.hpp:50
Exiv2::Image::AutoPtr
std::auto_ptr< Image > AutoPtr
Image auto_ptr type.
Definition: image.hpp:81
Exiv2::Photoshop::ps3Id_
static const char ps3Id_[]
Photoshop marker
Definition: jpgimage.hpp:49
Exiv2::JpegBase::sof11_
static const byte sof11_
JPEG Start-Of-Frame marker.
Definition: jpgimage.hpp:231
Exiv2::JpegBase::sof15_
static const byte sof15_
JPEG Start-Of-Frame marker.
Definition: jpgimage.hpp:234
Safe::add
T add(T summand_1, T summand_2)
Safe addition, throws an exception on overflow.
Definition: safe_op.hpp:288
Exiv2::BasicIo::AutoPtr
std::auto_ptr< BasicIo > AutoPtr
BasicIo auto_ptr type.
Definition: basicio.hpp:58
Exiv2::Image::writeXmpFromPacket
bool writeXmpFromPacket() const
Return the flag indicating the source when writing XMP metadata.
Definition: image.cpp:757
Exiv2::Error
BasicError< char > Error
Error class used for exceptions (std::string based)
Definition: error.hpp:324
Exiv2::JpegBase::writeHeader
virtual int writeHeader(BasicIo &oIo) const =0
Writes the image header (aka signature) to the BasicIo instance.
Exiv2::isJpegType
EXIV2API bool isJpegType(BasicIo &iIo, bool advance)
Check if the file iIo is a JPEG image.
Definition: jpgimage.cpp:1354
Exiv2::IptcData
A container for IPTC data. This is a top-level class of the Exiv2 library.
Definition: iptc.hpp:170
Exiv2::JpegBase::dri_
static const byte dri_
JPEG DRI marker.
Definition: jpgimage.hpp:214
Exiv2::IptcParser::encode
static DataBuf encode(const IptcData &iptcData)
Encode the IPTC datasets from iptcData to a binary representation in IPTC IIM4 format.
Definition: iptc.cpp:510
Exiv2::PrintStructureOption
PrintStructureOption
Options for printStructure.
Definition: image.hpp:64
Exiv2::JpegBase::xmpId_
static const char xmpId_[]
XMP packet identifier.
Definition: jpgimage.hpp:237
Exiv2::Photoshop::isIrb
static bool isIrb(const byte *pPsData, long sizePsData)
Checks an IRB.
Definition: jpgimage.cpp:121
EXV_ERROR
#define EXV_ERROR
Shorthand for a temp error log message object and return its ostringstream.
Definition: error.hpp:150
Exiv2::BasicIo::seek
virtual int seek(long offset, Position pos)=0
Move the current IO position.
Exiv2::ErrorCode
ErrorCode
Complete list of all Exiv2 error codes.
Definition: error.hpp:191
Exiv2::Photoshop::iptc_
static const uint16_t iptc_
Photoshop IPTC marker
Definition: jpgimage.hpp:52
Exiv2::Photoshop::setIptcIrb
static DataBuf setIptcIrb(const byte *pPsData, long sizePsData, const IptcData &iptcData)
Set the new IPTC IRB, keeps existing IRBs but removes the IPTC block if there is no new IPTC data to ...
Definition: jpgimage.cpp:249
Exiv2::JpegBase::sof10_
static const byte sof10_
JPEG Start-Of-Frame marker.
Definition: jpgimage.hpp:230
Exiv2::JpegBase::sof7_
static const byte sof7_
JPEG Start-Of-Frame marker.
Definition: jpgimage.hpp:228
Exiv2::Photoshop
Helper class, has methods to deal with Photoshop "Information Resource Blocks" (IRBs).
Definition: jpgimage.hpp:47
Exiv2::BasicIo
An interface for simple binary IO.
Definition: basicio.hpp:55
Exiv2::IptcData::count
long count() const
Get the number of metadata entries.
Definition: iptc.hpp:257
Exiv2::Image::xmpData_
XmpData xmpData_
XMP data container.
Definition: image.hpp:487
Exiv2::Image::xmpData
virtual XmpData & xmpData()
Returns an XmpData instance containing currently buffered XMP data.
Definition: image.cpp:590
Exiv2::Image
Abstract base class defining the interface for an image. This is the top-level interface to the Exiv2...
Definition: image.hpp:78
Exiv2::Image::setIccProfile
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
Exiv2::WriteMethod
WriteMethod
Type to indicate write method used by TIFF parsers.
Definition: types.hpp:105
Exiv2::Photoshop::locatePreviewIrb
static int locatePreviewIrb(const byte *pPsData, long sizePsData, const byte **record, uint32_t *const sizeHdr, uint32_t *const sizeData)
Forwards to locatePreviewIrb() with psTag = preview_.
Definition: jpgimage.cpp:239
Exiv2::XmpParser::decode
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
Exiv2::JpegBase::sos_
static const byte sos_
JPEG SOS marker.
Definition: jpgimage.hpp:215
Exiv2::getULong
EXIV2API uint32_t getULong(const byte *buf, ByteOrder byteOrder)
Read a 4 byte unsigned long value from the data buffer.
Definition: types.cpp:278
Exiv2::ExvImage::isExvType
friend EXIV2API bool isExvType(BasicIo &iIo, bool advance)
Check if the file iIo is an EXV file.
Definition: jpgimage.cpp:1406
error.hpp
Error class for exceptions, log message class.
Exiv2::Photoshop::bimId_
static const char bimId_[]
Photoshop IRB marker (deprecated)
Definition: jpgimage.hpp:51
Exiv2::Blob
std::vector< byte > Blob
Container for binary data.
Definition: types.hpp:151