 |
Exiv2
|
Go to the documentation of this file.
34 #include "exiv2lib_export.h"
105 void doWriteMetadata(
BasicIo& oIo);
107 byte readPgfMagicNumber(
BasicIo& iIo);
109 uint32_t readPgfHeaderSize(
BasicIo& iIo);
111 DataBuf readPgfHeaderStructure(
BasicIo& iIo,
int& width,
int & height);
129 EXIV2API
bool isPgfType(BasicIo& iIo,
bool advance);
133 #endif // #ifndef PGFIMAGE_HPP_
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:50
virtual bool isopen() const =0
Returns true if the IO source is open, otherwise false.
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:269
IptcData iptcData_
IPTC data container.
Definition: image.hpp:489
Utility class that closes a BasicIo instance upon destruction. Meant to be used as a stack variable i...
Definition: basicio.hpp:264
void writeMetadata()
Write metadata back to the image.
Definition: pgfimage.cpp:160
EXIV2API std::string strError()
Return a system error message and the error code (errno). See strerror(3).
Definition: futils.cpp:352
ExifData exifData_
Exif data container.
Definition: image.hpp:488
EXIV2API bool isPgfType(BasicIo &iIo, bool advance)
Check if the file iIo is a PGF image.
Definition: pgfimage.cpp:333
void readMetadata()
Read all metadata supported by a specific image format from the image. Before this method is called,...
Definition: pgfimage.cpp:107
int pixelHeight_
image pixel height
Definition: image.hpp:495
virtual void clearMetadata()
Erase all buffered metadata. Metadata is not removed from the actual image until the writeMetadata() ...
Definition: image.cpp:541
std::string mimeType() const
Return the MIME type of the image.
Definition: pgfimage.hpp:87
Port of D's enforce() to C++ & Exiv2.
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:893
PGF image, implemented using the following references: PGF specification from libpgf web site
int pixelWidth_
image pixel width
Definition: image.hpp:494
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
virtual int putb(byte data)=0
Write one byte to the IO source. Current IO position is advanced by one byte.
long size_
The current size of the buffer.
Definition: types.hpp:271
virtual bool eof() const =0
Returns true if the IO position has reached the end, otherwise false.
virtual DataBuf read(long rcount)=0
Read data from the IO source. Reading starts at the current IO position and the position is advanced ...
Class to access PGF images. Exif and IPTC metadata are supported directly.
Definition: pgfimage.hpp:57
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
virtual std::string path() const =0
Return the path to the IO resource. Often used to form comprehensive error messages where only a Basi...
PgfImage(BasicIo::AutoPtr io, bool create)
Constructor that can either open an existing PGF image or create a new image from scratch....
Definition: pgfimage.cpp:85
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:323
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.
BasicIo::AutoPtr io_
Image data IO pointer.
Definition: image.hpp:487
std::auto_ptr< Image > AutoPtr
Image auto_ptr type.
Definition: image.hpp:84
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
virtual int seek(long offset, Position pos)=0
Move the current IO position.
const int png
PNG image type (see class PngImage)
Definition: pngimage.hpp:51
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:930
XmpData xmpData_
XMP data container.
Definition: image.hpp:490
virtual XmpData & xmpData()
Returns an XmpData instance containing currently buffered XMP data.
Definition: image.cpp:561
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.
virtual IptcData & iptcData()
Returns an IptcData instance containing currently buffered IPTC data.
Definition: image.cpp:556
Error class for exceptions, log message class.
virtual ExifData & exifData()
Returns an ExifData instance containing currently buffered Exif data.
Definition: image.cpp:551