Exiv2: Exiv2::CrwParser Class Reference

# Exiv2::CrwParser Class Reference

`#include <crwimage.hpp>`

List of all members.

## Static Public Member Functions
static void | decode (CrwImage *pCrwImage, const byte *pData, uint32_t size)
| Decode metadata from a Canon Crw image in data buffer pData of length size into crwImage.
static void | encode (Blob &blob, CiffHeader *pHead, const CrwImage *pCrwImage)
| Encode metadata from the Crw image into a data buffer (the binary Crw image).

## Detailed Description

Stateless parser class for Canon Crw images (Ciff format).

## Member Function Documentation

void Exiv2::CrwParser::decode | ( | CrwImage * | pCrwImage,
|  | const byte * | pData,
|  | uint32_t | size |
| ) |  |  | `[static]`

Decode metadata from a Canon Crw image in data buffer pData of length size into crwImage.

This is the entry point to access image data in Ciff format. The parser uses classes CiffHeader, CiffEntry, CiffDirectory.

Parameters:

  | pCrwImage | Pointer to the Exiv2 Crw image to hold the metadata read from the buffer.
  | pData | Pointer to the data buffer. Must point to the data of a Crw image; no checks are performed.
  | size | Length of the data buffer.

Exceptions:

  | Error | If the data buffer cannot be parsed.

Referenced by Exiv2::CrwImage::readMetadata().

void Exiv2::CrwParser::encode | ( | Blob & | blob,
|  | CiffHeader * | pHead,
|  | const CrwImage * | pCrwImage |
| ) |  |  | `[static]`

Encode metadata from the Crw image into a data buffer (the binary Crw image).

Parameters:

  | blob | Data buffer for the binary image (target).
  | pCrwImage | Pointer to the Exiv2 Crw image with the metadata to encode.
  | pHead | Parse tree containing the existing image.

Exceptions:

  | Error | If the metadata from the Crw image cannot be encoded.

References Exiv2::CrwMap::encode(), and Exiv2::CiffHeader::write().

Referenced by Exiv2::CrwImage::writeMetadata().

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

- crwimage.hpp
- crwimage.cpp