Exiv2: Exiv2::JpegThumbnail Class Reference

# Exiv2::JpegThumbnail Class Reference

Exif thumbnail image in JPEG format. More...

`#include <exif.hpp>`

Inheritance diagram for Exiv2::JpegThumbnail:
[legend]
Collaboration diagram for Exiv2::JpegThumbnail:
[legend]

List of all members.

## Public Types
typedef std::auto_ptr < JpegThumbnail > | AutoPtr
| Shortcut for a JpegThumbnail auto pointer.
## Public Member Functions
Manipulators
JpegThumbnail & | operator= (const JpegThumbnail &rhs)
| Assignment operator.
Accessors
int | setDataArea (ExifData &exifData, Ifd *pIfd1, const byte *buf, long len) const
| Set the image data as data area of the appropriate Exif metadatum. Read the thumbnail image data from data buffer buf. Return 0 if successful.
DataBuf | copy (const ExifData &exifData) const
| Return the thumbnail image in a DataBuf. The caller owns the data buffer and DataBuf ensures that it will be deleted.
const char * | format () const
| Return a short string for the format of the thumbnail ("TIFF", "JPEG").
const char * | extension () const
| Return the file extension for the format of the thumbnail (".tif", ".jpg").

## Detailed Description

Exif thumbnail image in JPEG format.

## Member Function Documentation

int Exiv2::JpegThumbnail::setDataArea | ( | ExifData & | exifData,
|  | Ifd * | pIfd1,
|  | const byte * | buf,
|  | long | len |
| ) |  |  | const`[virtual]`

Set the image data as data area of the appropriate Exif metadatum. Read the thumbnail image data from data buffer buf. Return 0 if successful.

Parameters:

  | exifData | Exif data corresponding to the data buffer.
  | pIfd1 | Corresponding raw IFD1.
  | buf | Data buffer containing the thumbnail data. The buffer must start with the TIFF header.
  | len | Number of bytes in the data buffer.

Returns:
  0 if successful;
  1 in case of inconsistent thumbnail Exif data; or
  2 if the data area is outside of the data buffer

Implements Exiv2::Thumbnail.

References Exiv2::Ifd::end(), Exiv2::ExifData::end(), Exiv2::ExifData::findKey(), Exiv2::Ifd::findTag(), and format().

The documentation for this class was generated from the following files:

- exif.hpp
- exif.cpp