# Exiv2::TiffHeade2 Class Reference

This class models a TIFF header structure. More...

`#include <tiffimage.hpp>`

List of all members.

## Public Member Functions

Creators
| TiffHeade2 ()
| Default constructor.
Manipulators
bool | read (const byte *pData, uint32_t size)
| Read the TIFF header from a data buffer. Return false if the data buffer does not contain a TIFF header, else true.
Accessors
void | write (Blob &blob) const
| Write the TIFF header to the binary image blob. This method appends to the blob.
void | print (std::ostream &os, const std::string &prefix="") const
| Print debug info for the TIFF header to os.
ByteOrder | byteOrder () const
| Return the byte order (little or big endian).
uint32_t | ifdOffset () const
| Return the offset to the start of the root directory.
uint32_t | size () const
| Return the size (in bytes) of the TIFF header.
uint16_t | tag () const
| Return the tag value (magic number) which identifies the buffer as TIFF data.

## Detailed Description

This class models a TIFF header structure.

## Member Function Documentation

void Exiv2::TiffHeade2::print | ( | std::ostream & | os,
|  | const std::string & | prefix = `""`
| ) | const

Print debug info for the TIFF header to os.

Parameters:

  | os | Output stream to write to.
  | prefix | Prefix to be written before each line of output.

bool Exiv2::TiffHeade2::read | ( | const byte * | pData,
|  | uint32_t | size
| ) |

Read the TIFF header from a data buffer. Return false if the data buffer does not contain a TIFF header, else true.

Parameters:

  | pData | Pointer to the data buffer.
  | size | Number of bytes in the data buffer.

void Exiv2::TiffHeade2::write | ( | Blob & | blob | ) | const

Write the TIFF header to the binary image blob. This method appends to the blob.

Parameters:

  | blob | Binary image to add to.

Exceptions:

  | Error | If the header cannot be written.

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

- tiffimage.hpp
- tiffimage.cpp