# Exiv2::TiffHeader Class Reference

Helper class modelling the TIFF header structure. More...

`#include <image.hpp>`

List of all members.

## Public Member Functions

Creators
| TiffHeader (ByteOrder byteOrder=littleEndian)
| Default constructor. Optionally sets the byte order (default: little endian).
Manipulators
int | read (const byte *buf)
| Read the TIFF header from a data buffer. Returns 0 if successful.
Accessors
long | copy (byte *buf) const
| Write a standard TIFF header into buf as a data string, return number of bytes copied.
long | size () const
| Return the size of the TIFF header in bytes.
ByteOrder | byteOrder () const
| Return the byte order (little or big endian).
uint16_t | tag () const
| Return the tag value.
uint32_t | offset () const
| Return the offset to IFD0 from the start of the TIFF header. The offset is 0x00000008 if IFD0 begins immediately after the TIFF header.

## Detailed Description

Helper class modelling the TIFF header structure.

## Member Function Documentation

long Exiv2::TiffHeader::copy | ( | byte * | buf | ) | const

Write a standard TIFF header into buf as a data string, return number of bytes copied.

Only the byte order of the TIFF header varies, the values written for offset and tag are constant, i.e., independent of the values possibly read before a call to this function. The value 0x00000008 is written for the offset, tag is set to 0x002a.

Parameters:

  | buf | The data buffer to write to.

Returns:
  The number of bytes written.

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

- image.hpp
- image.cpp