Exiv2::PreviewImage Class Reference

Class that holds preview image properties and data buffer. More...

#include <preview.hpp>

Public Member Functions

Constructors
 PreviewImage (const PreviewImage &rhs)
 Copy constructor.
 
 ~PreviewImage ()
 Destructor.
 
Manipulators
PreviewImageoperator= (const PreviewImage &rhs)
 Assignment operator.
 

Friends

class PreviewManager
 

Accessors

DataBuf copy () const
 Return a copy of the preview image data. The caller owns this copy and DataBuf ensures that it will be deleted.
 
const bytepData () const
 Return a pointer to the image data for read-only access.
 
uint32_t size () const
 Return the size of the preview image in bytes.
 
long writeFile (const std::string &path) const
 Write the thumbnail image to a file. More...
 
std::string mimeType () const
 Return the MIME type of the preview image, usually either "image/tiff" or "image/jpeg".
 
std::string extension () const
 Return the file extension for the format of the preview image (".tif" or ".jpg").
 
uint32_t width () const
 Return the width of the preview image in pixels.
 
uint32_t height () const
 Return the height of the preview image in pixels.
 
PreviewId id () const
 Return the preview image type identifier.
 

Detailed Description

Class that holds preview image properties and data buffer.

Member Function Documentation

◆ writeFile()

long Exiv2::PreviewImage::writeFile ( const std::string &  path) const

Write the thumbnail image to a file.

A filename extension is appended to path according to the image type of the preview image, so path should not include an extension. The function will overwrite an existing file of the same name.

Parameters
pathFile name of the preview image without extension.
Returns
The number of bytes written.

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