 |
Exiv2
|
Go to the documentation of this file.
33 #include "exiv2lib_export.h"
89 void setIptcData(
const IptcData& iptcData);
95 int pixelWidth()
const;
96 int pixelHeight()
const;
130 static void decode(
CrwImage* pCrwImage,
const byte* pData, uint32_t size);
171 #endif // #ifndef CRWIMAGE_HPP_
void reset(std::pair< byte *, long >=std::make_pair((byte *)(0), long(0)))
Reset value.
Definition: types.cpp:187
Provides binary IO on blocks of memory by implementing the BasicIo interface. A copy-on-write impleme...
Definition: basicio.hpp:540
const int crw
CRW image type (see class CrwImage)
Definition: crwimage.hpp:52
static void encode(Blob &blob, const byte *pData, uint32_t size, const CrwImage *pCrwImage)
Encode metadata from the CRW image into a data buffer (the binary CRW image).
Definition: crwimage.cpp:164
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
Utility class that closes a BasicIo instance upon destruction. Meant to be used as a stack variable i...
Definition: basicio.hpp:264
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Class to access raw Canon CRW images. Only Exif metadata and a comment are supported....
Definition: crwimage.hpp:59
iterator findKey(const ExifKey &key)
Find the first Exifdatum with the given key, return an iterator to it.
Definition: exif.cpp:581
void readMetadata()
Read all metadata supported by a specific image format from the image. Before this method is called,...
Definition: crwimage.cpp:89
ExifMetadata::const_iterator const_iterator
ExifMetadata const iterator type.
Definition: exif.hpp:439
CiffComponent * findComponent(uint16_t crwTagId, uint16_t crwDir) const
Finds crwTagId in directory crwDir, returning a pointer to the component or 0 if not found.
Definition: crwimage_int.cpp:595
uint32_t size() const
Return the data size of this component.
Definition: crwimage_int.hpp:232
static void decode(CrwImage *pCrwImage, const byte *pData, uint32_t size)
Decode metadata from a Canon CRW image in data buffer pData of length size into crwImage.
Definition: crwimage.cpp:143
std::string mimeType() const
Return the MIME type of the image.
Definition: crwimage.cpp:60
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
iterator end()
End of the metadata.
Definition: exif.hpp:492
Definition: crwimage.hpp:113
CrwImage(BasicIo::AutoPtr io, bool create)
Constructor that can either open an existing CRW image or create a new image from scratch....
Definition: crwimage.cpp:55
virtual void clearMetadata()
Erase all buffered metadata. Metadata is not removed from the actual image until the writeMetadata() ...
Definition: image.cpp:541
const byte * pData() const
Return a pointer to the data area of this component.
Definition: crwimage_int.hpp:238
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:204
void alloc(long size)
Allocate a data buffer of at least the given size. Note that if the requested size is less than the c...
Definition: types.cpp:161
Concrete keys for Exif metadata and access to Exif tag reference data.
Definition: tags.hpp:148
int pixelHeight() const
Return the pixel height of the image.
Definition: crwimage.cpp:74
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 ...
static void encode(CiffHeader *pHead, const Image &image)
Encode image metadata from image into the CRW parse tree. This function converts all Exif metadata th...
Definition: crwimage_int.cpp:995
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
Value interface and concrete subclasses.
virtual BasicIo & io() const
Return a reference to the BasicIo instance being used for Io.
Definition: image.cpp:723
int pixelWidth() const
Return the pixel width of the image.
Definition: crwimage.cpp:65
BasicIo::AutoPtr io_
Image data IO pointer.
Definition: image.hpp:487
std::auto_ptr< Image > AutoPtr
Image auto_ptr type.
Definition: image.hpp:84
EXIV2API bool isCrwType(BasicIo &iIo, bool advance)
Check if the file iIo is a CRW image.
Definition: crwimage.cpp:195
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
Interface class for components of the CIFF directory hierarchy of a CRW (Canon Raw data) image....
Definition: crwimage_int.hpp:91
A container for IPTC data. This is a top-level class of the Exiv2 library.
Definition: iptc.hpp:173
@ string
IPTC string type.
Definition: types.hpp:147
void writeMetadata()
Write metadata back to the image.
Definition: crwimage.cpp:111
virtual int seek(long offset, Position pos)=0
Move the current IO position.
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
void setIptcData(const IptcData &iptcData)
Not supported. CRW format does not contain IPTC metadata. Calling this function will throw an Error(k...
Definition: crwimage.cpp:83
EXIV2API Image::AutoPtr newCrwInstance(BasicIo::AutoPtr io, bool create)
Create a new CrwImage instance and return an auto-pointer to it. Caller owns the returned object and ...
Definition: crwimage.cpp:186
Internal classes to support CRW/CIFF format.
Basic file utility functions required by Exiv2.
Error class for exceptions, log message class.
virtual ExifData & exifData()
Returns an ExifData instance containing currently buffered Exif data.
Definition: image.cpp:551
std::vector< byte > Blob
Container for binary data.
Definition: types.hpp:162