25#include "exiv2lib_export.h"
63 static bool isIrb(
const byte* pPsData,
73 static bool valid(
const byte* pPsData,
96 uint32_t *
const sizeHdr,
97 uint32_t *
const sizeData);
104 uint32_t *
const sizeHdr,
105 uint32_t *
const sizeData);
112 uint32_t *
const sizeHdr,
113 uint32_t *
const sizeData);
172 const byte initData[],
260 int initImage(
const byte initData[],
long dataSize);
268 void doWriteMetadata(
BasicIo& oIo);
281 int advanceToMarker()
const;
336 static const byte soi_;
337 static const byte blank_[];
389 static const char exiv2Id_[];
390 static const byte blank_[];
An interface for simple binary IO.
Definition basicio.hpp:55
std::auto_ptr< BasicIo > AutoPtr
BasicIo auto_ptr type.
Definition basicio.hpp:58
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition types.hpp:193
friend EXIV2API bool isExvType(BasicIo &iIo, bool advance)
Check if the file iIo is an EXV file.
Definition jpgimage.cpp:1406
int writeHeader(BasicIo &oIo) const
Writes the image header (aka signature) to the BasicIo instance.
Definition jpgimage.cpp:1381
std::string mimeType() const
Return the MIME type of the image.
Definition jpgimage.cpp:1376
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
ExvImage(BasicIo::AutoPtr io, bool create)
Constructor that can either open an existing EXV image or create a new image from scratch....
Definition jpgimage.cpp:1371
std::auto_ptr< Image > AutoPtr
Image auto_ptr type.
Definition image.hpp:81
virtual BasicIo & io() const
Return a reference to the BasicIo instance being used for Io.
Definition image.cpp:752
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
A container for IPTC data. This is a top-level class of the Exiv2 library.
Definition iptc.hpp:170
static const char jfifId_[]
JFIF identifier.
Definition jpgimage.hpp:236
static const byte app0_
JPEG APP0 marker.
Definition jpgimage.hpp:217
virtual int writeHeader(BasicIo &oIo) const =0
Writes the image header (aka signature) to the BasicIo instance.
static const byte com_
JPEG Comment marker.
Definition jpgimage.hpp:221
static const byte sof2_
JPEG Start-Of-Frame marker.
Definition jpgimage.hpp:224
JpegBase(int type, BasicIo::AutoPtr io, bool create, const byte initData[], long dataSize)
Constructor that can either open an existing image or create a new image from scratch....
Definition jpgimage.cpp:315
void printStructure(std::ostream &out, PrintStructureOption option, int depth)
Print out the structure of image file.
Definition jpgimage.cpp:557
static const byte dri_
JPEG DRI marker.
Definition jpgimage.hpp:214
static const byte sof14_
JPEG Start-Of-Frame marker.
Definition jpgimage.hpp:233
static const byte sof7_
JPEG Start-Of-Frame marker.
Definition jpgimage.hpp:228
static const byte sof9_
JPEG Start-Of-Frame marker.
Definition jpgimage.hpp:229
void writeMetadata()
Write metadata back to the image.
Definition jpgimage.cpp:872
static const byte sof13_
JPEG Start-Of-Frame marker.
Definition jpgimage.hpp:232
static const byte sof6_
JPEG Start-Of-Frame marker.
Definition jpgimage.hpp:227
static const char xmpId_[]
XMP packet identifier.
Definition jpgimage.hpp:237
static const byte sof15_
JPEG Start-Of-Frame marker.
Definition jpgimage.hpp:234
static const byte app1_
JPEG APP1 marker.
Definition jpgimage.hpp:218
static const byte sof1_
JPEG Start-Of-Frame marker.
Definition jpgimage.hpp:223
static const char exifId_[]
Exif identifier.
Definition jpgimage.hpp:235
static const byte sof11_
JPEG Start-Of-Frame marker.
Definition jpgimage.hpp:231
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.
static const byte dqt_
JPEG DQT marker.
Definition jpgimage.hpp:213
static const byte dht_
JPEG DHT marker.
Definition jpgimage.hpp:212
static const byte sof0_
JPEG Start-Of-Frame marker.
Definition jpgimage.hpp:222
static const byte app2_
JPEG APP2 marker.
Definition jpgimage.hpp:219
static const byte sos_
JPEG SOS marker.
Definition jpgimage.hpp:215
static const char iccId_[]
ICC profile identifier.
Definition jpgimage.hpp:238
static const byte sof3_
JPEG Start-Of-Frame marker.
Definition jpgimage.hpp:225
static const byte sof10_
JPEG Start-Of-Frame marker.
Definition jpgimage.hpp:230
void readMetadata()
Read all metadata supported by a specific image format from the image. Before this method is called,...
Definition jpgimage.cpp:353
static const byte sof5_
JPEG Start-Of-Frame marker.
Definition jpgimage.hpp:226
static const byte eoi_
JPEG EOI marker.
Definition jpgimage.hpp:216
static const byte app13_
JPEG APP13 marker.
Definition jpgimage.hpp:220
int writeHeader(BasicIo &oIo) const
Writes a Jpeg header (aka signature) to the BasicIo instance.
Definition jpgimage.cpp:1329
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
JpegImage(BasicIo::AutoPtr io, bool create)
Constructor that can either open an existing Jpeg image or create a new image from scratch....
Definition jpgimage.cpp:1319
std::string mimeType() const
Return the MIME type of the image.
Definition jpgimage.cpp:1324
friend EXIV2API bool isJpegType(BasicIo &iIo, bool advance)
Check if the file iIo is a JPEG image.
Definition jpgimage.cpp:1354
Supported image formats.
Definition asfvideo.hpp:42
const int exv
EXV image type (see class ExvImage).
Definition jpgimage.hpp:40
const int jpeg
JPEG image type (see class JpegImage).
Definition jpgimage.hpp:39
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition asfvideo.hpp:36
PrintStructureOption
Options for printStructure.
Definition image.hpp:64
EXIV2API bool isExvType(BasicIo &iIo, bool advance)
Check if the file iIo is an EXV file.
Definition jpgimage.cpp:1406
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
EXIV2API bool isJpegType(BasicIo &iIo, bool advance)
Check if the file iIo is a JPEG image.
Definition jpgimage.cpp:1354
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
Helper class, has methods to deal with Photoshop "Information Resource Blocks" (IRBs).
Definition jpgimage.hpp:47
static const uint16_t iptc_
Photoshop IPTC marker
Definition jpgimage.hpp:52
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
static bool valid(const byte *pPsData, long sizePsData)
Validates all IRBs.
Definition jpgimage.cpp:132
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
static const uint16_t preview_
Photoshop preview marker
Definition jpgimage.hpp:53
static const char * irbId_[]
Photoshop IRB markers
Definition jpgimage.hpp:50
static const char bimId_[]
Photoshop IRB marker (deprecated)
Definition jpgimage.hpp:51
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
static bool isIrb(const byte *pPsData, long sizePsData)
Checks an IRB.
Definition jpgimage.cpp:121
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
static const char ps3Id_[]
Photoshop marker
Definition jpgimage.hpp:49