Exiv2 - Exif and IPTC metadata library and tools
Author: Andreas Huggel
Description: Open source Exif and IPTC metadata library and tools with Exif MakerNote and read/write support
Keywords: exif, iptc, metadata, makernote, manipulation, manipulate, read and write, write, change, update, jpeg, jpg, ifd, image file directory, thumbnail, thumbnails, tag, tags, canon, fujifilm, sigma/foveon, nikon, open source, opensource, huggel, andreas, andreas huggel

- Main Page
- Namespaces
- Classes
- Files
- Examples

- Canon CRW

# Exiv2 supported Raw File Formats

## Canon CRW files: Mapping of CIFF to Exif tags

CRW files are encoded in CIFF format. CIFF format consists of a header and a hierarchy of directories and entries, similar to TIFF (but easier to deal with). In Exiv2, there is no CRW or CIFF type of metadata. Instead, known and suitable CIFF tags are mapped to Exif metadata, but not all CIFF tags are mapped. Exiv2 reads Canon CRW files, parses the CIFF structure and maps known and suitable tags to Exif metadata. Writing to CRW files entails a reverse mapping from Exif metadata to the CIFF tags. This way it is possible, e.g., to adjust the date when the image was taken by reading the CRW file, modifying Exif.Photo.DateTimeOriginal and writing the Exif data back to a CRW file. Tags for which there is no mapping defined are ignored during both, reading and writing.

Reference: The Canon RAW (CRW) File Format by Phil Harvey.

Exiv2 supports the mappings listed in the table below.

Click on a column header to sort the table.

Exif Key | CRW Tag | CRW Directory
--- | --- | ---
Mapped to the image comment | 0x0805 | 0x300a
Exif.Image.Make Exif.Image.Model | 0x080a | 0x2807
Exif.Canon.FirmwareVersion | 0x080b | 0x3004
Exif.Canon.OwnerName | 0x0810 | 0x2807
Exif.Canon.ImageType | 0x0815 | 0x2804
Exif.Canon.0x0002 | 0x1029 | 0x300b
Exif.CanonCs2.* Exif.Photo.FNumber (not used on write) Exif.Photo.ExposureTime (not used on write) | 0x102a | 0x300b
Exif.CanonCs.* | 0x102d | 0x300b
Exif.CanonCf.* | 0x1033 | 0x300b
Exif.CanonPi.* | 0x1038 | 0x300b
Exif.Canon.WhiteBalanceTable | 0x10a9 | 0x300b
Exif.Photo.ColorSpace | 0x10b4 | 0x300b
Exif.Canon.0x00b5 | 0x10b5 | 0x300b
Exif.Canon.0x00c0 | 0x10c0 | 0x300b
Exif.Canon.0x00c1 | 0x10c1 | 0x300b
Exif.Photo.SubjectDistance | 0x1807 | 0x3002
Exif.Canon.SerialNumber | 0x180b | 0x3004
Exif.Photo.DateTimeOriginal | 0x180e | 0x300a
Exif.Image.Orientation Exif.Photo.PixelXDimension Exif.Photo.PixelYDimension | 0x1810 | 0x300a
Exif.Canon.ImageNumber | 0x1817 | 0x300a
Exif.Canon.0x0015 | 0x183b | 0x300b
Exif.Thumbnail.Compression Exif.Thumbnail.JPEGInterchangeFormat Exif.Thumbnail.JPEGInterchangeFormatLength | 0x2008 | root