Exiv2: Exiv2::TiffHeaderBase Class Reference

- Main Page
- Namespaces
- Classes
- Files
- Examples

- Search for |

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

# Exiv2::TiffHeaderBase Class Reference

Abstract base class defining the interface of an image header. Used internally by classes for TIFF-based images. Default implementation is for the regular TIFF header. More...

`#include <tiffimage.hpp>`

Inheritance diagram for Exiv2::TiffHeaderBase:

[legend]

List of all members.

## Public Member Functions
Constructors
| TiffHeaderBase (uint16_t tag, uint32_t size, ByteOrder byteOrder, uint32_t offset)
| Constructor taking tag, size and default byteOrder and offset.
virtual | ~TiffHeaderBase ()=0
| Virtual destructor.
Manipulators
virtual bool | read (const byte *pData, uint32_t size)
| Read the image header from a data buffer. Return false if the data buffer does not contain an image header of the expected format, else true.
virtual void | setByteOrder (ByteOrder byteOrder)
| Set the byte order.
virtual void | setOffset (uint32_t offset)
| Set the offset to the start of the root directory.
Accessors
virtual void | write (Blob &blob) const
| Write the image header to the binary image blob. This method appends to the blob.
virtual void | print (std::ostream &os, const std::string &prefix="") const
| Print debug info for the image header to os.
virtual ByteOrder | byteOrder () const
| Return the byte order (little or big endian).
virtual uint32_t | offset () const
| Return the offset to the start of the root directory.
virtual uint32_t | size () const
| Return the size (in bytes) of the image header.
virtual uint16_t | tag () const
| Return the tag value (magic number) which identifies the buffer as TIFF data.

## Detailed Description

Abstract base class defining the interface of an image header. Used internally by classes for TIFF-based images. Default implementation is for the regular TIFF header.

## Member Function Documentation

virtual bool Exiv2::TiffHeaderBase::read | ( | const byte * | pData,
|  | uint32_t | size |
| ) |  |  | `[virtual]`

Read the image header from a data buffer. Return false if the data buffer does not contain an image header of the expected format, else true.

Parameters:

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

Reimplemented in Exiv2::Cr2Header, and Exiv2::OrfHeader.

virtual void Exiv2::TiffHeaderBase::write | ( | Blob & | blob | ) | const`[virtual]`

Write the image 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.

Reimplemented in Exiv2::Cr2Header, and Exiv2::OrfHeader.

virtual void Exiv2::TiffHeaderBase::print | ( | std::ostream & | os,
|  | const std::string & | prefix = `""` |
| ) |  |  | const`[virtual]`

Print debug info for the image header to os.

Parameters:

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

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

- tiffimage.hpp