From ea32b96bc9f8ea219e65e721388fb7011e37a031 Mon Sep 17 00:00:00 2001 From: Andreas Huggel Date: Sat, 29 Apr 2006 16:21:15 +0000 Subject: [PATCH] Makernote doc update and minor fix --- doc/templates/makernote.html.in | 151 +++++++++++++++++++++----------- src/makernote2.cpp | 2 +- 2 files changed, 100 insertions(+), 53 deletions(-) diff --git a/doc/templates/makernote.html.in b/doc/templates/makernote.html.in index 12b50652..5f567baa 100644 --- a/doc/templates/makernote.html.in +++ b/doc/templates/makernote.html.in @@ -10,7 +10,7 @@ __index1__

MakerNote Formats and Specifications

-The MakerNote is tag 0x927c in the Exif IFD. According to the +The Makernote is tag 0x927c in the Exif IFD. According to the Exif 2.2 standard, the makernote is "a tag for manufacturers of Exif writers to record any desired information. The contents are up to @@ -36,10 +36,12 @@ etc. In my opinion, this is a bug in the specification. In fact, some vendors se recognized this problem and use offsets relative to somewhere at the beginning of the makernote field for the makernote IFD.

-

The following table summarizes the structures of the MakerNote field used by some vendors. +

The following table summarizes the structures of the makernote field used by some vendors. Please let me know if you find further specifications on the Internet.

+ + @@ -48,107 +50,144 @@ Please let me know if you find further specifications on the Internet.

- - - - - + + + + + + + - - + + + + - + + + - + - - - + + + + + - + - + - + + + - + - - - + + + + + - + - - - - + + + + + + - - - + + + + + - + - - - + + + + + - + + + - + - + + + + - + + + - + + + + + + + + + + + + + + + + + +
MakeModelsFormatSpecsRemarksMakeFormatHeaderEndian 1)Offsets 2)RefRemarks
Canon  IFD[2]None   [2]Some CR2 images have a non-zero next-IFD pointer
CasioQV-3000EX, QV-2000UX, QV-8000SX IFD--- [4]"Early" versions of QV-2000UX and QV-8000SX only - have 4 bytes in the MakerNote field.Not supported by Exiv2 yet
Fujifilm IFD; starts with string "FUJIFILM" and an offset - to the first IFD, offsets are relative to the beginning of the MakerNoteFUJIFILMIFD, usually at offset 12Starts with the string "FUJIFILM" + and a 4 byte pointer to the IFDLittle endian (II)Relative to the beginning of the makernote [1]Fujifilm's Exif data uses big endian (MM) byte order, but the MakerNote - uses little endian (II) alignmentExif data uses big endian (MM) byte order
Minolta  IFD--- [5]MakerNote numbers are always stored in big endian (MM) byte orderNot supported by Exiv2 yet
Nikon (1)E990, D1IFD (from offset 0x00)NIKON (1)IFDNone   [3] Models using this makernote include E990, D1
Nikon (2)E700, E800, E900, E900S, E910, E950IFD; starts with string "Nikon\0", IFD from offset - 0x08[1]NIKON (2)IFD, at offset 8"Nikon\0" followed by two bytes of unknown meaning   [1]Models using this makernote include E700, E800, E900, E900S, E910, E950
Nikon (3)E5400, SQ, D2H, D70IFD; starts with string "Nikon\0" and a TIFF header - structureNIKON (3)IFD, usually at offset 18"Nikon\0" followed by 4 bytes which look like a version code + and a TIFF headerFrom makernote TIFF headerRelative to the start of the makernote TIFF header  The TIFF header structure indicates the byte order and the start offset - of the IFD. IFD offsets are relative to the start of the TIFF header.Models using this makernote include E5400, SQ, D2H, D70, D100, D200. + Makernote IFD of the D200 has no next-IFD pointer. (Is this a bug?)
Olympus D450Z(C-920Z)IFD; starts with string "OLYMP", IFD from offset - 0x07OLYMPUSIFD, at offset 8"OLYMP\0" followed by two bytes of unknown meaning   [1]  
SanyoDSC-MZ2 IFD--- [6]Tag 0x00ff contains the offset to the start of the MakerNote(?). - The semantics of the value is different in TIFF and JPEG imagesNot supported by Exiv2 yet
Sigma, FoveonSIGMA, FOVEONIFD, at offset 10"SIGMA\0\0\0" or "FOVEON\0\0" followed by two bytes + of unknown meaning   IFD; Starts with an 8-byte ID string "SIGMA\0\0\0" or - "FOVEON\0\0" [7]  
PanasonicIFD without a next-IFD pointer at offset 12"Panasonic\0\0\0"   Non-standard IFD (without a next-IFD pointer); Starts with an 12-byte ID string "Panasonic\0\0\0" [8]  
SONY (1)IFD without a next-IFD pointer at offset 12"SONY DSC \0\0\0"   Seen in Jpeg images, e.g., from DSC-W7, DSC-R1
SONY (2)IFDNone   Seen in SR2 images, e.g., from DSC-R1
+ +

+ + 1) If not specified, the byte order of the Exif data is applicable.
+ 2) If not specified, offsets are relative to the start of the TIFF header. +
+

+

Exif.org has another table with similar info and sample pictures: Digital Camera Sample Images. According to this source, (at least some) Ricoh and - Kodak cameras do not write the MakerNote in IFD format.

+ Kodak cameras do not write the makernote in IFD format.

References

[1] Exif file format by TsuruZoh Tachibanaya
- [2] EXIF MakerNote + [2] EXIF Makernote of Canon by David Burren
- [3] MakerNote + [3] Makernote EXIF Tag of the Nikon 990 by Max Lyons
- [4] "MakerNote" + [4] "Makernote" Exif tag of Casio by Eckhard Henkel
[5] Minolta MakerNote by Dalibor Jelinek
diff --git a/src/makernote2.cpp b/src/makernote2.cpp index 4fe3b87b..7ca598cc 100644 --- a/src/makernote2.cpp +++ b/src/makernote2.cpp @@ -182,7 +182,7 @@ namespace Exiv2 { // Read offset to the IFD relative to the start of the makernote // from the header. Note that we ignore the byteOrder argument - start_ = getUShort(header_.pData_ + 8, byteOrder_); + start_ = getULong(header_.pData_ + 8, byteOrder_); if ( static_cast(header_.size_) < size_ || 0 != memcmp(header_.pData_, signature_, 8)) {