#include <exif.hpp>
Inheritance diagram for Exiv2::Thumbnail:
Public Member Functions | |
Creators | |
| virtual | ~Thumbnail () |
| Virtual destructor. | |
Manipulators | |
| virtual int | read (const byte *buf, long len, const ExifData &exifData, ByteOrder byteOrder=littleEndian)=0 |
| Read the thumbnail from the data buffer buf, using Exif metadata exifData. Return 0 if successful. | |
| virtual void | setOffsets (Ifd &ifd1, ByteOrder byteOrder)=0 |
| Update the internal offset and the thumbnail data offsets in IFD1 assuming the thumbnail data follows immediately after IFD1. | |
Accessors | |
| virtual int | write (const std::string &path) const =0 |
| Write thumbnail to file path. | |
| virtual const char * | format () const =0 |
| Return a short string for the format of the thumbnail ("TIFF", "JPEG"). | |
| virtual const char * | extension () const =0 |
| Return the file extension for the format of the thumbnail (".tif", ".jpg"). | |
| virtual long | copy (byte *buf) const =0 |
| Copy the thumbnail image data (without the IFD, if any) to the data buffer buf. The user must ensure that the buffer has enough memory. Otherwise the call results in undefined behaviour. Return the number of characters written. | |
| virtual void | update (ExifData &exifData) const =0 |
| Update the Exif data according to the actual thumbnail image. | |
| virtual long | offset () const =0 |
| Return the position of the thumbnail image data from the start of the TIFF header in the original Exif data. | |
| virtual long | size () const =0 |
| Return the size of the thumbnail image (the size it would occupy when extracted from the Exif data). | |
| virtual long | dataSize () const =0 |
| Return the size of the thumbnail data (data only, without the IFD, in case of a TIFF thumbnail). | |
Protected Member Functions | |
Manipulators | |
| Thumbnail & | operator= (const Thumbnail &rhs) |
| Assignment operator. Protected so that it can only be used by subclasses but not directly. | |
|
||||||||||||||||||||
|
Read the thumbnail from the data buffer buf, using Exif metadata exifData. Return 0 if successful.
Implemented in Exiv2::TiffThumbnail, and Exiv2::JpegThumbnail.
|
|
||||||||||||
|
Update the internal offset and the thumbnail data offsets in IFD1 assuming the thumbnail data follows immediately after IFD1. If the type of the thumbnail image is JPEG, JPEGInterchangeFormat is set to point directly behind the data area of IFD1. If the type is TIFF, StripOffsets from the thumbnail image are adjusted to point to the strips, which have to follow immediately after IFD1. Use copy() to write the thumbnail image data. The offset of IFD1 must be set correctly. Changing the size or data size of IFD1 invalidates the thumbnail data offsets set by this method. Implemented in Exiv2::TiffThumbnail, and Exiv2::JpegThumbnail.
|
|
|
Update the Exif data according to the actual thumbnail image. If the type of the thumbnail image is JPEG, JPEGInterchangeFormat is set to 0. If the type is TIFF, StripOffsets are set to the offsets of the IFD of the thumbnail image itself. Implemented in Exiv2::TiffThumbnail, and Exiv2::JpegThumbnail.
|
|
|
Write thumbnail to file path.
Implemented in Exiv2::TiffThumbnail, and Exiv2::JpegThumbnail.
|
1.3.8