 |
Exiv2
|
24 #include "exiv2lib_export.h"
85 std::string mimeType()
const;
102 void doWriteMetadata(
BasicIo& oIo);
105 std::string profileName_;
126 #endif // #ifndef PNGIMAGE_HPP_
byte * pData_
Pointer to the buffer, 0 if none has been allocated.
Definition: types.hpp:258
std::string indent(int32_t d)
indent output for kpsRecursive in printStructure() .
Definition: image_int.cpp:106
Slice< T > makeSlice(T &cont, size_t begin, size_t end)
Return a new slice with the given bounds.
Definition: slice.hpp:665
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:316
static ByteOrder decode(ExifData &exifData, IptcData &iptcData, XmpData &xmpData, const byte *pData, uint32_t size)
Decode metadata from a buffer pData of length size with data in TIFF format to the provided metadata ...
Definition: tiffimage.cpp:248
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:118
Class to access PNG images. Exif and IPTC metadata are supported directly.
Definition: pngimage.hpp:47
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
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:347
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:193
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
void writeMetadata()
Write metadata back to the image.
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:403
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 ...
ByteOrder
Type to express the byte order (little or big endian)
Definition: types.hpp:102
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:81
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.
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:324
void printStructure(std::ostream &out, PrintStructureOption option, int depth)
Print out the structure of image file.
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
const int png
PNG image type (see class PngImage)
Definition: pngimage.hpp:40
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:249
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:78
EXIV2API uint32_t getULong(const byte *buf, ByteOrder byteOrder)
Read a 4 byte unsigned long value from the data buffer.
Definition: types.cpp:278
Error class for exceptions, log message class.
std::vector< byte > Blob
Container for binary data.
Definition: types.hpp:151
EXIV2API bool isPngType(BasicIo &iIo, bool advance)
Check if the file iIo is a PNG image.