Exiv2::ExifThumb Class Reference
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. | |
Manipulators | |
| void | setJpegThumbnail (const std::string &path, URational xres, URational yres, uint16_t unit) |
| Set the Exif thumbnail to the JPEG image path. Set XResolution, YResolution and ResolutionUnit to xres, yres and unit, respectively. | |
| void | setJpegThumbnail (const byte *buf, long 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. | |
| void | setJpegThumbnail (const std::string &path) |
| Set the Exif thumbnail to the JPEG image path. | |
| void | setJpegThumbnail (const byte *buf, long size) |
| Set the Exif thumbnail to the JPEG image pointed to by buf, and size size. | |
| void | erase () |
| Delete the thumbnail from the Exif data. Removes all Exif.Thumbnail.*, i.e., Exif IFD1 tags. | |
Detailed Description
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.
- Note:
- Various other preview and thumbnail images may be contained in an image, depending on its format and the camera make and model. This class only provides access to the Exif thumbnail as specified in the Exif standard.
Member Function Documentation
| void Exiv2::ExifThumb::setJpegThumbnail | ( | const std::string & | path, | |
| URational | xres, | |||
| URational | yres, | |||
| uint16_t | unit | |||
| ) |
Set the Exif thumbnail to the JPEG image path. 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.
- Exceptions:
-
Error if reading the file fails.
- Note:
- No checks on the file format or size are performed.
Additional existing Exif thumbnail tags are not modified.
The JPEG image inserted as thumbnail image should not itself contain Exif data (or other metadata), as existing applications may have problems with that. (The preview application that comes with OS X for one.) - David Harvey.
| void Exiv2::ExifThumb::setJpegThumbnail | ( | const byte * | buf, | |
| long | 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.
- Exceptions:
-
Error if reading the file fails.
- Note:
- No checks on the image format or size are performed.
Additional existing Exif thumbnail tags are not modified.
The JPEG image inserted as thumbnail image should not itself contain Exif data (or other metadata), as existing applications may have problems with that. (The preview application that comes with OS X for one.) - David Harvey.
| void Exiv2::ExifThumb::setJpegThumbnail | ( | const std::string & | path | ) |
Set the Exif thumbnail to the JPEG image path.
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.)
- Exceptions:
-
Error if reading the file fails.
- Note:
- No checks on the file format or size are performed.
Additional existing Exif thumbnail tags are not modified.
| void Exiv2::ExifThumb::setJpegThumbnail | ( | const byte * | buf, | |
| long | 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.)
- Note:
- No checks on the image format or size are performed.
Additional existing Exif thumbnail tags are not modified.
The documentation for this class was generated from the following file: