 |
Exiv2
|
Go to the documentation of this file.
35 #include "exiv2lib_export.h"
113 void doWriteMetadata(
BasicIo& oIo);
137 #endif // #ifndef PNGIMAGE_HPP_
byte * pData_
Pointer to the buffer, 0 if none has been allocated.
Definition: types.hpp:269
std::string indent(int32_t d)
indent output for kpsRecursive in printStructure() .
Definition: image_int.cpp:106
Type definitions for Exiv2 and related functionality.
Slice< T > makeSlice(T &cont, size_t begin, size_t end)
Return a new slice with the given bounds.
Definition: slice.hpp:673
static void decodeIHDRChunk(const DataBuf &data, int *outWidth, int *outHeight)
Decode PNG IHDR chunk data from a data buffer data and return image size to outWidth and outHeight.
EXIV2API std::string strError()
Return a system error message and the error code (errno). See strerror(3).
Definition: futils.cpp:356
PngImage(BasicIo::AutoPtr io, bool create)
Constructor that can either open an existing PNG image or create a new image from scratch....
binaryToStringHelper< T > binaryToString(const Slice< T > sl)
format binary data for display in Image::printStructure()
Definition: image_int.hpp:125
Class to access PNG images. Exif and IPTC metadata are supported directly.
Definition: pngimage.hpp:58
Port of D's enforce() to C++ & Exiv2.
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:653
std::string mimeType() const
Return the MIME type of the image.
std::string stringFormat(const char *format,...)
format a string in the pattern of sprintf .
Definition: image_int.cpp:32
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:351
void enforce(bool condition, const T &arg1)
Ensure that condition is true, otherwise throw an exception of the type exception_t.
Definition: enforce.hpp:43
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:204
long size_
The current size of the buffer.
Definition: types.hpp:271
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
void writeMetadata()
Write metadata back to the image.
Class PngChunk to parse PNG chunk data implemented using the following references: PNG iTXt chunk st...
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
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:408
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 ...
static std::string makeMetadataChunk(const std::string &metadata, MetadataId type)
Return a complete PNG chunk data compressed or not as buffer. Data returned is formated accordingly w...
std::auto_ptr< Image > AutoPtr
Image auto_ptr type.
Definition: image.hpp:84
void readMetadata()
Read all metadata supported by a specific image format from the image. Before this method is called,...
static DataBuf keyTXTChunk(const DataBuf &data, bool stripHeader=false)
Return PNG TXT chunk key as data buffer.
PNG image, implemented using the following references: PNG specification by W3C PNG tags list by Phi...
std::auto_ptr< BasicIo > AutoPtr
BasicIo auto_ptr type.
Definition: basicio.hpp:58
BasicError< char > Error
Error class used for exceptions (std::string based)
Definition: error.hpp:323
@ string
IPTC string type.
Definition: types.hpp:147
void printStructure(std::ostream &out, PrintStructureOption option, int depth)
Print out the structure of image file.
PrintStructureOption
Options for printStructure.
Definition: image.hpp:67
#define EXV_ERROR
Shorthand for a temp error log message object and return its ostringstream.
Definition: error.hpp:150
const int png
PNG image type (see class PngImage)
Definition: pngimage.hpp:51
static void decodeTXTChunk(Image *pImage, const DataBuf &data, TxtChunkType type)
Decode PNG tEXt, zTXt, or iTXt chunk data from pImage passed by data buffer data and extract Comment,...
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:239
An interface for simple binary IO.
Definition: basicio.hpp:55
Abstract base class defining the interface for an image. This is the top-level interface to the Exiv2...
Definition: image.hpp:81
Basic file utility functions required by Exiv2.
EXIV2API uint32_t getULong(const byte *buf, ByteOrder byteOrder)
Read a 4 byte unsigned long value from the data buffer.
Definition: types.cpp:283
Error class for exceptions, log message class.
std::vector< byte > Blob
Container for binary data.
Definition: types.hpp:162
Class JpegImage to access JPEG images.
EXIV2API bool isPngType(BasicIo &iIo, bool advance)
Check if the file iIo is a PNG image.