Access and modify an Exif thumbnail image. This class implements manipulators to set and erase the thumbnail image that is optionally embedded in IFD1 of the Exif data. Accessors are provided by the base class, ExifThumbC. More...
#include <exif.hpp>
Public Member Functions | |
Creators | |
ExifThumb (ExifData &exifData) | |
Constructor. | |
Public Member Functions inherited from Exiv2::ExifThumbC | |
ExifThumbC (const ExifData &exifData) | |
Constructor. | |
DataBuf | copy () const |
Return the thumbnail image in a DataBuf. The caller owns the data buffer and DataBuf ensures that it will be deleted. | |
const char * | mimeType () const |
Return the MIME type of the thumbnail, either "image/tiff" or "image/jpeg" . | |
const char * | extension () const |
Return the file extension for the format of the thumbnail (".tif" or ".jpg"). | |
Manipulators | |
void | setJpegThumbnail (const byte *buf, size_t size, URational xres, URational yres, uint16_t unit) |
Set the Exif thumbnail to the JPEG image pointed to by buf, and size size. Set XResolution, YResolution and ResolutionUnit to xres, yres and unit, respectively. More... | |
void | setJpegThumbnail (const byte *buf, size_t size) |
Set the Exif thumbnail to the JPEG image pointed to by buf, and size size. More... | |
void | erase () |
Delete the thumbnail from the Exif data. Removes all Exif.Thumbnail.*, i.e., Exif IFD1 tags. | |
Access and modify an Exif thumbnail image. This class implements manipulators to set and erase the thumbnail image that is optionally embedded in IFD1 of the Exif data. Accessors are provided by the base class, ExifThumbC.
void Exiv2::ExifThumb::setJpegThumbnail | ( | const byte * | buf, |
size_t | size | ||
) |
Set the Exif thumbnail to the JPEG image pointed to by buf, and size size.
This sets only the Compression, JPEGInterchangeFormat and JPEGInterchangeFormatLength tags, which is not all the thumbnail Exif information mandatory according to the Exif standard. (But it's enough to work with the thumbnail.)
void Exiv2::ExifThumb::setJpegThumbnail | ( | const byte * | buf, |
size_t | size, | ||
URational | xres, | ||
URational | yres, | ||
uint16_t | unit | ||
) |
Set the Exif thumbnail to the JPEG image pointed to by buf, and size size. Set XResolution, YResolution and ResolutionUnit to xres, yres and unit, respectively.
This results in the minimal thumbnail tags being set for a JPEG thumbnail, as mandated by the Exif standard.
Error | if reading the file fails. |