- Main Page
- Namespaces
- Classes
- Files
- Examples

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Exiv2::Thumbnail Class Reference

Exif Thumbnail image. This abstract base class provides the interface for the thumbnail image that is optionally embedded in the Exif data. This class is used internally by ExifData, it is probably not useful for a client as a standalone class. Instead, use an instance of ExifData to access the Exif thumbnail image. More...

`#include <exif.hpp>`

Inheritance diagram for Exiv2::Thumbnail:

[legend]
List of all members.

## Public Types
typedef std::auto_ptr< Thumbnail > | AutoPtr
| Shortcut for a Thumbnail auto pointer.
## Public Member Functions
Creators
virtual | ~Thumbnail ()
| Virtual destructor.
Accessors
virtual int | setDataArea (ExifData &exifData, Ifd *pIfd1, const byte *buf, long len) const =0
| 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.
virtual DataBuf | copy (const ExifData &exifData) const =0
| Return the thumbnail image in a DataBuf. The caller owns the data buffer and DataBuf ensures that it will be deleted.
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").
## Protected Member Functions
Manipulators
Thumbnail & | operator= (const Thumbnail &rhs)
| Assignment operator. Protected so that it can only be used by subclasses but not directly.

## Detailed Description

Exif Thumbnail image. This abstract base class provides the interface for the thumbnail image that is optionally embedded in the Exif data. This class is used internally by ExifData, it is probably not useful for a client as a standalone class. Instead, use an instance of ExifData to access the Exif thumbnail image.

## Member Function Documentation

virtual int Exiv2::Thumbnail::setDataArea | ( | ExifData & | exifData,
|  | Ifd * | pIfd1,
|  | const byte * | buf,
|  | long | len
| ) | const`[pure 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 Implemented in Exiv2::TiffThumbnail, and Exiv2::JpegThumbnail.

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

- exif.hpp