|
Posted on 2010-02-23 09:53 lymons 閱讀(19640) 評論(7) 編輯 收藏 引用 所屬分類: 文章翻譯
該文檔的日文版 該文檔的 英文版 翻譯 : Lymons Lau , l y m o n s @ g m a i l . c o m
Exif文件格式描述
當前,幾乎新型的數碼相機都使用Exif文件格式來存儲圖像. 它的規(guī)格是由 JEIDA 來制定的, 但是在互聯網上還沒有開放的文檔可供瀏覽. 因此我根據從互聯網上所能得到一些開放資料做成了這份Exif格式的描述文檔. 注: 現在我們能得到官方的文檔 Exif2.1 ,它來自 PIMA 的web站點.ISO 正致力于建立 DCF (Design rule for Camera File system/相機文件系統(tǒng)設計規(guī)則) 規(guī)格. 所有的數碼相機的制造商正準備遵循這份規(guī)則并且已經在他們的最新的數字相機上使用了. DCF規(guī)格為數字相機定義了完整的文件系統(tǒng); 如,目錄結構, 文件命名方法, 字符集和文件格式等等. 這里的文件格式就是基于 Exif2.1 規(guī)格制定的. 這份文檔基本上是基于 Exif2.1/DCF 規(guī)格做成的, 如果你有關于 'unknown' 條目的信息或者是發(fā)現了勘誤, 請 e-mail 我, TsuruZoh Tachibanaya , t s u r u z o h @ b a . w a k w a k . c o m 這是一份免費的文檔, 你可以使用于任何目的(商業(yè)/非商業(yè))下. 文檔里面提到的所有的商業(yè)名稱都是商標或者被各自持有者所注冊的商標.
TsuruZoh Tachibanaya, t s u r u z o h @ b a . w a k w a k . c o m
http://park2.wakwak.com/~tsuruzoh/
rev. 1.4 Feb.03,2001 rev. 1.3 Sep.09,2000 rev. 1.2 Jul.19,2000 rev. 1.1 Dec.19,1999 rev. 1.0 May.28,1999
參考材料
Exif文件格式 itojun著 (日文版文檔) Exif文件格式 Mamoru Ohno著 (日文版文檔) TIFF6.0 規(guī)格說明 Adobe公司著 TIFF/EP 規(guī)格說明 ISO TC42 WG18著 exifdump 程序由 Thierry Boush完成制作 DCF 規(guī)格說明 ISO TC42 WG18著 Exif2.1 規(guī)格說明 JEIDA著
基本上, Exif文件格式與JPEG 文件格式相同. Exif按照JPEG的規(guī)格在JPEG中插入一些 圖像/數字相機 的信息數據以及縮略圖像. 于是你能通過與JPEG兼容的互聯網瀏覽器/圖片瀏覽器/圖像處理等一些軟件 來查看Exif格式的圖像文件. 就跟瀏覽通常的JPEG圖像文件一樣.
每一個JPEG文件的內容都開始于一個二進制的值 '0xFFD8', 并結束與二進制值'0xFFD9'. 在JPEG的數據 中有好幾種類似于二進制 0xFFXX 的數據, 它們都統(tǒng)稱作 "標記", 并且它們代表了一段JPEG的 信息數據. 0xFFD8 的意思是 SOI圖像起始(Start of image), 0xFFD9 則表示 EOI圖像結束 (End of image). 這兩個特殊的標記的后面都不跟隨數據, 而其他的標記在后面則會附帶數據. 標記的基本 格式如下. 0xFF+標記號(1個字節(jié))+數據大小描述符(2個字節(jié))+數據內容(n個字節(jié))數據大小描述符(2個字節(jié)) 是 "Motorola" 的字節(jié)順序, 數據的低位被存放在高地址,也就是 BigEndian. 請注意上面中的 "數據內容" 中包含他前面的數據大小描述符, 如果下面的是一個標記的話; FF C1 00 0C它就表示這個標記(0xFFC1) 的數據占 0x000C(等于12)個字節(jié). 但是這個數據大小'12' 包含了 "數據大小" 描述符, 也就是在0x000C后面它只允許帶有10 個字節(jié)大小的數據. 在JPEG 格式中, 最開始先是用一些標記來描述數據, 然后是放置 SOS數據流的起始(Start of stream) 標記. 在SOS標記的后面才是, 存放JPEG圖像的數據流并終結于EOI標記.
SOI 標記 |
標記 XX 的大小=SSSS |
標記 YY 的大小=TTTT |
SOS 標記 的大小=UUUU |
圖像數據流 |
EOI 標記 |
FFD8 |
FFXX |
SSSS |
DDDD...... |
FFYY |
TTTT |
DDDD...... |
FFDA |
UUUU |
DDDD.... |
I I I I.... |
FFD9 |
0xFFE0~0xFFEF之間的標記被叫做 "應用標記", 它們在JPEG圖像解碼中不是必須存在的. 它們被使用于用戶的應用程序之中. 例如, 老款的olympus/canon/casio/agfa 數字相機使用 JFIF(JPEG文件交換格式/JPEG File Interchange Format)來存儲圖像. JFIF 使用 APP0(0xFFE0) 標記來插入數字相機的配置信息數據和縮略圖. Exif也使用應用標記來插入數據, 但是Exif 使用 APP1(0xFFE1)標記來避免與JFIF格式的 沖突. 且每一個 Exif 文件格式都開始于它, 如;
SOI 標記 |
APP1 標記 |
APP1 數據 |
Other 標記 |
FFD8 |
FFE1 |
SSSS 457869660000 TTTT...... |
FFXX SSSS DDDD...... |
該圖像文件從SOI(0xFFD8) 標記開始, 因此它是一個 JPEG 文件. 后面馬上跟著 APP1 標記. 而它的所有 Exif數據都被存儲在 APP1 數據域中. 上面的 "SSSS" 這部分表示 APP1 數據域 (Exif data area)的大小. 請注意這里的大小 "SSSS" 包含描述符本身的大小. 在 "SSSS"后面, 是 APP1 的數據. 其中第一個部分是一個特殊的數據,它用來標識是否是 Exif, 其值是ASCII 字符 "Exif" 和 兩個0x00字節(jié) 的組合字符串. 在 APP1 標記域的后面是, 跟隨著其他的 JPEG 標記.
Exif的數據結構 (APP1)大致如下面那樣. 這是"Intel"字節(jié)序的情況, 并且它包含了JPEG 格式的 縮略圖. 就像上面描述的那樣, Exif 數據開始于ASCII字符 "Exif" 和2個字節(jié)的0x00, 后面才是 Exif的數據. Exif 使用 TIFF 格式來存儲數據. 想獲取TIFF的更多的細節(jié)的話, 請參考 .
FFE1 |
APP1 標記 |
SSSS |
APP1 數據 |
APP1 數據大小 |
45786966 0000 |
Exif 頭 |
49492A00 08000000 |
TIFF 頭 |
XXXX. . . . |
IFD0 (主圖像) |
目錄 |
LLLLLLLL |
連接到 IFD1 |
XXXX. . . . |
IFD0的數據域 |
XXXX. . . . |
|
Exif 子IFD |
目錄 |
00000000 |
連接結束 |
XXXX. . . . |
Exif 子IFD的數據域 |
XXXX. . . . |
|
Interoperability IFD |
Directory |
00000000 |
連接結束 |
XXXX. . . . |
Interoperability IFD的數據域 |
XXXX. . . . |
Makernote IFD |
Directory |
00000000 |
連接結束 |
XXXX. . . . |
Makernote IFD的數據域 |
XXXX. . . . |
IFD1(縮略圖像) |
目錄 |
00000000 |
連接結束 |
XXXX. . . . |
IFD1的數據域 |
FFD8XXXX. . . XXXXFFD9 |
縮略圖像 |
TIFF格式中前8個字節(jié)是 TIFF 頭. 其中最開始的前2個字節(jié)定義了 TIFF 數據的字節(jié)序. 如果這個值是 0x4949="I I"的話, 就表示按照 "Intel" 的字節(jié)序(Little Endian) 來排列數據. 如果是 0x4d4d="MM", 則說明按照 "Motorola" 的字節(jié)序(Big Endian)來排列數據. 例如, 這個值是'305,419,896' (注意:16進制值為0x12345678). 在 Motorola 的 字節(jié)序中, 數據存儲時的排列順序為 0x12,0x34,0x56,0x78. 而用 Intel 的字節(jié)序的話, 它就是按照 0x78,0x56,0x34,0x12 來排序數據. 幾乎所有的數字相機都是使用 Intel 的字節(jié)序. 不過 Ricoh 使用的是 Motorola 的. Sony 使用的是 Intel 字節(jié)序(除了 D700). Kodak 的DC200/210/240 使用的是 Motorola 字節(jié)序, 但是 DC220/260 使用的是 Intel的, 盡管它們都是使用在 PowerPC的平臺上! 因此當我們需要使用 Exif 數據的值的時候, 我們必須每次都要檢查它的字節(jié)序. 盡管 JPEG 數據僅僅是使用 Motorola 字節(jié)序, 但 Exif 卻是允許這兩種字節(jié)序存在的. 我不明白 Exif 為什么不把字節(jié)序修訂成 Motorola的. 隨后的兩個字節(jié)是一個2字節(jié)長度的固定值 0x002A. 如果數據使用 Intel 字節(jié)序, 則這兩個 字節(jié)的數據排列為 "0x2a,0x00". 如果是 Motorola 的, 則是 "0x00,0x2a". TIFF頭的最后的 4個字節(jié)是到第一個 IFD(圖像文件目錄/Image File Directory, 將在下一節(jié)中描述)的偏移量. 這個偏移量是指從TIFF頭("II" 或者 "MM")開始, 包含自己偏移量值的本身, 到下一個IFD為止的 長度的字節(jié)數. 通常地第一個 IFD 是緊挨著 TIFF 頭出現的, 因此這個偏移量的值是 '0x00000008'.
字節(jié)序 |
標簽標注 |
到第一個IFD的偏移量 |
"I I" or "MM" |
0x002a |
0x00000008 |
緊挨著 TIFF 頭, 就是第一個 IFD:圖像文件目錄(Image File Directory). 它包含了圖像 信息的數據. 在下面的表格中, 前兩個字節(jié)('EEEE') 表示在IFD中有多少個目錄項(directory entry) . 它后面存放就是目錄項(每個項目大小為12字節(jié)) . 在最后一個目錄項之后, 有 一個4個字節(jié)大小的數據(表格中'LLLLLLLL' ), 它意味著到下一個IFD的偏移量. 如果這個 值是'0x00000000', 則表示它是最后一個IFD 并且不在跟任何的 IFD 相連接.
EEEE |
目錄項的號碼 |
TTTT |
ffff |
NNNNNNNN |
DDDDDDDD |
項目 0 |
TTTT |
ffff |
NNNNNNNN |
DDDDDDDD |
項目 1 |
. . . . . . . . . |
. . . . . . |
TTTT |
ffff |
NNNNNNNN |
DDDDDDDD |
項目 EEEE-1 |
LLLLLLLL |
到下一個IFD的偏移量 |
上表中的'TTTT'(2個字節(jié)) 是一個標簽的號碼, 代表數據的種類. 'ffff'(2個字節(jié))表示 數據的格式, 'NNNNNNNN'(4個字節(jié))表示組件的數目. 'DDDDDDDD'(4個字節(jié)) 則是數據的 值或者到數據值的偏移量.
數據格式 (上面表格中的'ffff') 的定義如下表示. "rational" 的意思是說明數據的 內容是一個分數, 它含有2個有符號/無符號的長整形(signed/unsigned long integer)值, 并且第一個值表示的是分子, 第二個值則是, 分母.
數據的值 |
1 |
2 |
3 |
4 |
5 |
6 |
格式 |
unsigned byte |
ascii strings |
unsigned short |
unsigned long |
unsigned rational |
signed byte |
組件的大小(字節(jié)數) |
1 |
1 |
2 |
4 |
8 |
1 |
|
數據的值 |
7 |
8 |
9 |
10 |
11 |
12 |
格式 |
undefined |
signed short |
signed long |
signed rational |
single float |
double float |
組件的大小(字節(jié)數) |
1 |
2 |
4 |
8 |
4 |
8 |
通過多個存儲在'NNNNNNNN'數據區(qū)的'組件的大小(字節(jié)數)'你能得到所有數據的字節(jié)長度. 如果數據的長度小于4個字節(jié), 則'DDDDDDDD' 就表示的是標簽的值. 如果長度超過4字節(jié), 則'DDDDDDDD' 里存放的就是所要存儲數據的偏移量地址.
在Exif格式中, 第一個IFD 是IFD0(主圖像IFD), 然后它連接到IFD1(縮略圖IFD) 并且IFD 連接在此結束. 但是 IFD0/IFD1 不包含任何的數字相機的信息例如快門速度, 焦距等. IFD0 總是包含一個特殊的標簽 Exif偏移量(0x8769), 它表示到 Exif子IFD 的偏移量. Exif子IFD 也是一個IFD 格式化的數據, 它包含了數字相機的信息. 在擴展Exif格式(Exif2.1/DCF)中, Exif子IFD還包含了特殊的標簽 Exif Interoperability Offset (0xa005). 這個偏移量也指向Interoperability IFD. 根據 DCF 規(guī)格, 這個標簽是必須的并且子IFD (主圖像 IFD) 和 IFD1 (縮略圖 IFD) 中可能也會包含Interoperability IFD. 通常, 僅僅主圖像僅僅有這個標簽. 另外一些數字相機也為Makernote(制造商注釋)使用 IFD 數據格式; 這是生產商特定的 魔數(magic number)區(qū)域. 判斷makernote 是否是IFD 格式是非常困難的, 必須仔細的 編程. 關于Makernote的信息請參考附錄.
0000: 49 49 2A 00 08 00 00 00-02 00 1A 01 05 00 01 00
0010: 00 00 26 00 00 00 69 87-04 00 01 00 00 00 11 02
0020: 00 00 40 00 00 00 48 00-00 00 01 00 00 00
上面的是TIFF數據的開頭部分, 對它的解讀如下;
- 前兩個字節(jié)是 "I I", 所以字節(jié)序是 'Intel'.
- 在地址0x0004~0x0007處存放的值是 0x08000000, 因此IFD0 從地址 '0x0008'開始
- 在地址0x0008~0x0009處存放的值是 0x0200, 則表示IFD0有 '2' 個目錄項.
- 在地址0x000a~0x000b處存放的值是 0x1A01, 它意味著這是一個 XResolution(0x011A) 標簽, 表示這是圖像的水平分辨率.
- 地址0x000c~0x000d處存放的值為 0x0500, 說明數據的格式是一個 unsigned rational(0x0005).
- 地址0x000e~0x0011處存放的值是 0x01000000, 說明組件的數據只有 '1'個. Unsigned rational的數據大小是8字節(jié)(組件的大小), 因此數據的總長度是 1x8=8字節(jié).
- 總數居長度比4字節(jié)大了, 因此它后面的4個字節(jié)里面存放的是一個指向實際數據的偏移量地址.
- 地址0x0012~0x0015處存放的是 0x26000000, 表示XResolution(水平分辨率) 數據的存儲地址是0x0026
- 地址0x0026~0x0029處存放的數據是 0x48000000, 說明分子的值為 72, 而地址0x002a~0x002d 處存放的是0x0100000000, 說明分母為 '1'. 因此XResoultion 的值是 72/1.
- 地址0x0016~0x0017處存放的數據為0x6987, 表示下一個標簽是 ExifOffset(0x8769). 這就是 指向 Exif子IFD的偏移量
- 而它的數據格式是 0x0004, 即是一個無符號的長整形(unsigned long integer).
- 這個標簽只有一個組件. 無符號長整形的數據大小是4字節(jié), 因此總數據長度為4字節(jié).
- 總數據長度是 4字節(jié), 則說明下一個4字節(jié)的數據中存放的是Exif子IFD的偏移量.
- 地址0x001e~0x0021處存放的是 0x11020000, 則說明Exif子IFD的開始地址是 '0x0211'.
- 這是最后一個目錄項, 接下來的4個字節(jié)存放的是下一個IFD的偏移地址.
- 地址0x0022~0x0025處存放的是 0x40000000, 就可以知道下一個IFD的開始地址為 '0x0040'
Exif格式中包含縮略圖像(除了Ricoh RDC-300Z). 通常它被放到IFD1的后面. 縮略圖有 3 種格式; JPEG 格式(JPEG 使用YCbCr), RGB TIFF 格式, YCbCr TIFF 格式. 在Exif2.1之后推薦使用JPEG 格式和160x120像素的尺寸. 根據 DCF 規(guī)格, 縮略圖像 必須 使用JPEG 格式以及圖像的尺寸 固定為160x120 像素.
IFD1中的標簽 Compression(0x0103)如果是 '6', 則縮略圖就是JPEG格式. 幾乎所有的 Exif圖像中縮略圖都使用JPEG 格式. 在這種情況下, 你能從IFD1的 JpegIFOffset(0x0201) 標簽中得到縮略圖的偏移量, 從標簽 JpegIFByteCount(0x0202)中得到縮略圖的大小. 數據格式則是普通的 JPEG 格式, 也就是從0xFFD8處開始在0xFFD9處結束.
IFD1的標簽 Compression(0x0103)如果是 '1', 則縮略圖的格式就沒有經過壓縮的 (就是TIFF 圖像). 縮略圖數據的開始點是標簽 StripOffset(0x0111) , 縮略圖的尺寸 就是標簽 StripByteCounts(0x0117) 之和. 如果縮略圖使用非壓縮格式并且IFD1中的標簽 PhotometricInterpretation(0x0106) 是 '2', 則縮略圖使用了 RGB 格式. 在這種情況下, 你只要簡單的把數據拷貝到計算機的RGB格式 中就能看到縮略圖了(如 BMP 格式, 或者拷貝到 VRAM 目錄下). Kodak DC-210/220/260 就使用 這個格式. 注意TIFF中存儲的像素數據是'RGB' 順序的, 而 BMP 里的存儲順序則是 'BGR' . 如果這個標簽的值是 '6', 縮略圖使用 YCbCr 格式. 如果你想要看到縮略圖的話, 你必須把它 轉換成 RGB 格式的. Ricoh RDC4200/4300, Fuji DS-7/300 和 DX-5/7/9 使用的是這種格式 (較新的 RDC5000/MX-X00 系列使用的是 JPEG). 在下一節(jié)中主要描述的就是Fuji DS相機的縮略圖 的圖像轉換. 想要了解更多的信息, 請參考 TIFF6.0 規(guī)格說明. 在DX-5/7/9的場合, YCbCrSubsampling(0x0212) 的值是 '2,1', PlanarConfiguration(0x011c) 的 值是 '1'. 因此這種圖像的數據排列是下面的那樣. Y(0,0),Y(1,0),Cb(0,0),Cr(0,0), Y(2,0),Y(3,0),Cb(2,0),Cr(3.0), Y(4,0),Y(5,0),Cb(4,0),Cr(4,0). . . . 括號中的數字代表的是像素坐標. DX 系列中000YCbCrCoefficients(0x0211) 的值是 '0.299/0.587/0.114', ReferenceBlackWhite(0x0214) 的值是 '0,255,128,255,128,255'. 于是把 Y/Cb/Cr 轉換成 RGB 就是; B(0,0)=(Cb-128)*(2-0.114*2)+Y(0,0) R(0,0)=(Cr-128)*(2-0.299*2)+Y(0,0) G(0,0)=(Y(0,0)-0.114*B(0,0)-0.299*R(0,0))/0.587 水平 subsampling 的值是 '2', 因此你能使用 Y(1,0)和 Cr(0,0)/Cb(0,0)計算出B(1,0)/R(1,0)/G(1,0). 根據ImageWidth(0x0100) 和 ImageLength(0x0101)的值可以重復這些轉換.
下面顯示了 Exif/TIFF 使用的標簽數. 如果這個標簽組件數目的上限, CompoNo 一欄就代表這一數值. 如果這個數值沒有, 則說明這兒沒有上限值.
IFD0 (主圖像)使用的標簽 |
標簽號 |
標簽名 |
格式 |
組件數 |
描述 |
0x010e |
ImageDescription |
ascii string |
|
用來描述圖像. 雙字節(jié)的字符碼不能使用, 如 中文/韓文/日文. |
0x010f |
Make |
ascii string |
|
表示數字相機的制造商. 在 Exif 標準中, 這個標簽是可選的, 但是在DCF中它是必需的. |
0x0110 |
Model |
ascii string |
|
表示數字相機的模塊代碼. 在 Exif 標準中, 這個標簽是可選的, 但在DCF中它也是必需的. |
0x0112 |
Orientation |
unsigned short |
1 |
Value |
0th Row |
0th Column |
1 |
top |
left side |
2 |
top |
right side |
3 |
bottom |
right side |
4 |
bottom |
left side |
5 |
left side |
top |
6 |
right side |
top |
7 |
right side |
bottom |
8 |
left side |
bottom |
當拍照時, 相機相對于場景的方向. 在右邊表示的是'0th row' 以及 '0th column' 在視覺位置上的關系. |
0x011a |
XResolution |
unsigned rational |
1 |
圖像的 顯示/打印 分辨率. 缺省值是 1/72英寸, 但是它沒有意義因為個人PC在 顯示/打印 圖像的時候不使用這個值. |
0x011b |
YResolution |
unsigned rational |
1 |
0x0128 |
ResolutionUnit |
unsigned short |
1 |
XResolution(0x011a)/YResolution(0x011b)的單位. '1' 表示沒有單位, '2' 意味著英寸, '3' 表示厘米. 缺省值是 '2'(英寸). |
0x0131 |
Software |
ascii string |
|
顯示固件的版本號(數字相機的內部控制軟件). |
0x0132 |
DateTime |
ascii string |
20 |
圖像最后一次被修改時的日期/時間. 日期的格式是 "YYYY:MM:DD HH:MM:SS"+0x00, 一共 20個字節(jié). 如果沒有設置時鐘或者數字相機沒有時鐘, 則這個域是用空格來填充. 通常, 它和DateTimeOriginal(0x9003)具有相同的值 |
0x013e |
WhitePoint |
unsigned rational |
2 |
定義圖像白點(white point/白點:在彩色分色、照相或攝影時作為色彩平衡測量用途的參考點) 的色度(chromaticity). 如果圖像是用CIE標準照度 D65(著名的是 '光線/daylight'的國際標準), 這個值是 '3127/10000,3290/10000'. |
0x013f |
PrimaryChromaticities |
unsigned rational |
6 |
定義圖像的原始色度. 如果圖像使用 CCIR 推薦 709原始色度, 則這個值是 '640/1000,330/1000,300/1000,600/1000,150/1000,0/1000'. |
0x0211 |
YCbCrCoefficients |
unsigned rational |
3 |
當圖像的格式是 YCbCr(JPEG的格式), 這個值表示轉換成 RGB格式的一個常量. 通常, 這個值是'0.299/0.587/0.114'. |
0x0213 |
YCbCrPositioning |
unsigned short |
1 |
當圖像的格式是 YCbCr 并且使用 '子采樣/Subsampling'(色度數據的剪切值, 所有的數字相機都使用), 定義了subsampling 像素陣列的色度采樣點. '1'表示像素陣列的中心, '2' 表示基準點. |
0x0214 |
ReferenceBlackWhite |
unsigned rational |
6 |
表示黑點(black point)/白點 的參考值. 在YCbCr 格式中,前兩個值是 Y的黑點/白點, 下兩個值是 Cb, 最后兩個值是 Cr. 而在 RGB 格式中, 前兩個表示R的黑點/白點, 下兩個是 G, 最后兩個是 B. |
0x8298 |
Copyright |
ascii string |
|
表示版權信息 |
0x8769 |
ExifOffset |
unsigned long |
1 |
Exif 子IFD的偏移量 |
Exif 子IFD使用的標簽 |
標簽號 |
標簽名 |
格式 |
組件數 |
描述 |
0x829a |
ExposureTime |
unsigned rational |
1 |
曝光時間 (快門速度的倒數). 單位是秒. |
0x829d |
FNumber |
unsigned rational |
1 |
拍照時的光圈F-number(F-stop). |
0x8822 |
ExposureProgram |
unsigned short |
1 |
拍照時相機使用的曝光程序. '1' 表示手動曝光, '2' 表示正常程序曝光, '3' 表示光圈優(yōu)先曝光, '4' 表示快門優(yōu)先曝光, '5' 表示創(chuàng)意程序(慢速程序), '6' 表示動作程序(高速程序), '7'表示 肖像模式, '8' 表示風景模式. |
0x8827 |
ISOSpeedRatings |
unsigned short |
2 |
CCD 的感光度, 等效于 Ag-Hr 膠片的速率. |
0x9000 |
ExifVersion |
undefined |
4 |
Exif 的版本號. 用4個ASCII字符來存儲. 如果圖片是基于Exif V2.1的, 這個值是 "0210". 因為它不是一個用NULL(0x00)來終結的字符串,所以這里的類型是 'undefined'. |
0x9003 |
DateTimeOriginal |
ascii string |
20 |
照片在被拍下來的日期/時間. 使用用戶的軟件是不能被修改這個值的. 日期的格式是 "YYYY:MM:DD HH:MM:SS"+0x00, 一共占用20個字節(jié). 如果數字相機沒有設置時鐘或者 數字相機沒有時鐘, 這個域使用空格來填充. 在Exif標準中, 這個標簽是可選的, 但是在 DCF中是必需的. |
0x9004 |
DateTimeDigitized |
ascii string |
20 |
照片被數字化時的日期/時間. 通常, 它與DateTimeOriginal(0x9003)具有相同的值. 數據格式是 "YYYY:MM:DD HH:MM:SS"+0x00, 一共占用20個字節(jié). 如果數字相機沒有設置時鐘或者 數字相機沒有時鐘, 這個域使用空格來填充. 在Exif標準中, 這個標簽是可選的, 但是在 DCF中是必需的. |
0x9101 |
ComponentsConfiguration |
undefined |
|
表示的是像素數據的順序. 大多數情況下RGB格式使用 '0x04,0x05,0x06,0x00' 而YCbCr 格式使用 '0x01,0x02,0x03,0x00'. 0x00:并不存在, 其他的對應關系為 0x01:Y, 0x02:Cb, 0x03:Cr, 0x04:Red, 0x05:Green, 0x06:Bllue. |
0x9102 |
CompressedBitsPerPixel |
unsigned rational |
1 |
JPEG (粗略的估計)的平均壓縮率. |
0x9201 |
ShutterSpeedValue |
signed rational |
1 |
用APEX表示出的快門速度. 為了轉換成原始的 'Shutter Speed'; 則先要計算2的ShutterSpeedValue次冪, 然后求倒數. 例如, 如果 ShutterSpeedValue 是 '4', 快門速度則是1/(24)=1/16秒. |
0x9202 |
ApertureValue |
unsigned rational |
1 |
拍照時鏡頭的光圈. 單位是 APEX. 為了轉換成普通的 F-number(F-stop), 則要先計算出根號2 2 (=1.4142)的ApertureValue次冪. 例如, 如果ApertureValue 是 '5', F-number 就等于1.41425 = F5.6. |
0x9203 |
BrightnessValue |
signed rational |
1 |
被拍攝對象的明度, 單位是 APEX. 為了從BrigtnessValue(Bv)計算出曝光量(Ev), 你必須加上 SensitivityValue(Sv). Ev=Bv+Sv Sv=log2(ISOSpeedRating/3.125) ISO100:Sv=5, ISO200:Sv=6, ISO400:Sv=7, ISO125:Sv=5.32. |
0x9204 |
ExposureBiasValue |
signed rational |
1 |
照片拍攝時的曝光補償. 單位是APEX(EV). |
0x9205 |
MaxApertureValue |
unsigned rational |
1 |
鏡頭的最大光圈值. 你可以通過計算根號2的MaxApertureValue次冪來轉換成普通的光圈 F-number (跟ApertureValue:0x9202的處理過程一樣). |
0x9206 |
SubjectDistance |
signed rational |
1 |
到焦點的距離, 單位是米. |
0x9207 |
MeteringMode |
unsigned short |
1 |
曝光的測光方法. '0' 表示未知, '1' 為平均測光, '2' 為中央重點測光, '3' 是點測光, '4' 是多點測光, '5' 是多區(qū)域測光, '6' 部分測光, '255' 則是其他. |
0x9208 |
LightSource |
unsigned short |
1 |
光源, 實際上是表示白平衡設置. '0' 意味著未知, '1'是日光, '2'是熒光燈, '3' 白熾燈(鎢絲), '10' 閃光燈, '17' 標準光A, '18' 標準光B, '19' 標準光C, '20' D55, '21' D65, '22' D75, '255' 為其他. |
0x9209 |
Flash |
unsigned short |
1 |
'0' 表示閃光燈沒有閃光, '1' 表示閃光燈閃光, '5' 表示閃光但沒有檢測反射光, '7' 表示閃光且檢測了反射光. |
0x920a |
FocalLength |
unsigned rational |
1 |
拍攝照片時的鏡頭的焦距長度. 單位是毫米. |
0x927c |
MakerNote |
undefined |
|
制造商的內部數據. 一些制造商如 Olympus/Nikon/Sanyo 等在這個區(qū)域中使用IFD 格式的數據. |
0x9286 |
UserComment |
undefined |
|
存儲用戶的注釋. 這個標簽允許使用兩字節(jié)的德字符或者 unicode. 前8 個字節(jié)描述的是字符集. 'JIS' 是日文 (著名的有 Kanji). '0x41,0x53,0x43,0x49,0x49,0x00,0x00,0x00':ASCII '0x4a,0x49,0x53,0x00,0x00,0x00,0x00,0x00':JIS '0x55,0x4e,0x49,0x43,0x4f,0x44,0x45,0x00':Unicode '0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00':Undefined
|
0x9290 |
SubsecTime |
ascii string |
|
一些數字相機每秒能拍攝 2~30 張照片, 但是DateTime/DateTimeOriginal/DateTimeDigitized 標簽只能記錄到秒單位的時間. SubsecTime 標簽就是用來記錄秒后面的數據(微秒). 例如, DateTimeOriginal = "1996:09:01 09:15:30", SubSecTimeOriginal = "130", 合并起來的原始的拍攝 時間就是 "1996:09:01 09:15:30.130"
|
0x9291 |
SubsecTimeOriginal |
ascii string |
|
0x9292 |
SubsecTimeDigitized |
ascii string |
|
0xa000 |
FlashPixVersion |
undefined |
4 |
存儲FlashPix 的版本信息. 如果圖像數據是基于 FlashPix formar Ver.1.0, 則這個值為 "0100". 因為它不是一個用NULL(0x00)來終結的字符串,所以這里的類型是 'undefined'. |
0xa001 |
ColorSpace |
unsigned short |
1 |
定義色彩空間. DCF 圖像必須使用 sRGB 色彩空間因此這個值總是 '1'. 如果這個照片使用了 其他的色彩空間, 這個值是 '65535':未校準(Uncalibrated). |
0xa002 |
ExifImageWidth |
unsigned short/long |
1 |
主圖像的尺寸大小. |
0xa003 |
ExifImageHeight |
unsigned short/long |
1 |
0xa004 |
RelatedSoundFile |
ascii string |
|
如果數字相機能夠紀錄圖像的音頻數據, 則表示音頻數據的名字. |
0xa005 |
ExifInteroperabilityOffset |
unsigned long |
1 |
表示這是一個擴展"ExifR98", 細節(jié)未知. 這個值經常是IFD格式的數據. 當前這兒有兩個 目錄項, 第一個是 Tag0x0001, 值是"R98", 下一個是 Tag0x0002, 它的值為 "0100". |
0xa20e |
FocalPlaneXResolution |
unsigned rational |
1 |
表示CCD的像素密度. 如果你的相機是百萬像素的并且是用低分辨率(如VGA模式) 來拍攝照片, 這個值可以通過照片的分辨率來重新采樣. 在這種情況下, FocalPlaneResolution 就不是CCD的實際的分辨率. |
0xa20f |
FocalPlaneYResolution |
unsigned rational |
1 |
0xa210 |
FocalPlaneResolutionUnit |
unsigned short |
1 |
FocalPlaneXResoluton/FocalPlaneYResolution的單位. '1' 表示沒有單位, '2'是英寸inch, '3' 表示厘米.
注意:一些Fujifilm的數碼相機(如.FX2700,FX2900,Finepix4700Z/40i 等) 使用的值是 '3' 所以它的單位一定是 '厘米' , 但是它們的分辨率單位就變成'8.3mm?'(1/3in.?). 這是Fuji 的 BUG? 從Finepix4900Z 開始這個值就使用 '2' 了但仍然跟實際的值不吻合. |
0xa215 |
ExposureIndex |
unsigned rational |
1 |
跟ISOSpeedRatings(0x8827)一樣但是數據類型是 unsigned rational. 只有Kodak的數字相機使用 這個標簽來替代 ISOSpeedRating, 我不知道這是為什么(歷史原因?). |
0xa217 |
SensingMethod |
unsigned short |
1 |
表示圖像傳感器單元的類型. '2' 意味著這是一個芯片顏色區(qū)域傳感器, 幾乎所有的數字相機都 使用這個類型. |
0xa300 |
FileSource |
undefined |
1 |
顯示圖像來源. 值 '0x03' 表示圖像源是數字定格相機. |
0xa301 |
SceneType |
undefined |
1 |
表示拍攝場景的類型. 值 '0x01' 表示圖像是通過相機直接拍攝出來的. |
0xa302 |
CFAPattern |
undefined |
|
表示色彩過濾陣列(CFA) 幾何模式.
長度 |
類型 |
意義 |
2 |
short |
Horizontal repeat pixel unit = n |
2 |
short |
Vertical repeat pixel unit = m |
1 |
byte |
CFA value[0,0] |
: |
: |
: |
1 |
byte |
CFA value[n-1,0] |
1 |
byte |
CFA value[0,1] |
: |
: |
: |
1 |
byte |
CFA value[n-1,m-1] |
色彩過濾和CFA值之間的關系.
Filter Color |
Red |
Green |
Blue |
Cyan |
Magenta |
Yellow |
White |
CFA value |
0 |
1 |
2 |
3 |
4 |
5 |
6 |
例如, 普通的 RGB 過濾器使用左表的副本, 這個值是 '0x0002,0x0002,0x00,0x01,0x01,0x02'.
|
Interoperability IFD使用的標簽 |
標簽號 |
標簽名 |
格式 |
組件號 |
描述 |
0x0001 |
InteroperabilityIndex |
Ascii string |
4 |
如果這個IFD 是主圖像的 IFD 并且文件內容采用的是 ExifR98 v1.0, 那這個值就是 "R98". 如果是所略圖的, 這個值則是 "THM". |
0x0002 |
InteroperabilityVersion |
Undefined |
4 |
紀錄interoperability的版本. "0100" 表示版本1.00. |
0x1000 |
RelatedImageFileFormat |
Ascii string |
any |
紀錄圖像文件的文件格式. 這個值是 ascii 字符串(如. "Exif JPEG Ver. 2.1"). |
0x1001 |
RelatedImageWidth |
Short or Long |
1 |
紀錄圖像的大小尺寸. |
0x1001 |
RelatedImageLength |
Short or Long |
1 |
IFD1 (縮略圖)使用的標簽 |
標簽號 |
標簽名 |
格式 |
組件數 |
描述 |
0x0100 |
ImageWidth |
unsigned short/long |
1 |
表示縮略圖的大小. |
0x0101 |
ImageLength |
unsigned short/long |
1 |
0x0102 |
BitsPerSample |
unsigned short |
3 |
當圖像格式沒有經過壓縮, 這個值表示每像素的比特位的數目. 通常這個值是 '8,8,8' |
0x0103 |
Compression |
unsigned short |
1 |
代表壓縮的方式. '1' 表示非壓縮, '6' 表示JPEG 壓縮格式. |
0x0106 |
PhotometricInterpretation |
unsigned short |
1 |
表示圖像數據組件的色彩空間. '1' 意味著單色, '2'表示 RGB, '6' 表示 YCbCr. |
0x0111 |
StripOffsets |
unsigned short/long |
|
如果圖像格式沒有經過壓縮, 這個值表示的是到圖像數據的偏移量. 在圖像數據被分割的 情況下它有多個值. |
0x0115 |
SamplesPerPixel |
unsigned short |
1 |
如果圖像格式沒有經過壓縮, 這個值表示每個像素中存儲的組件數目. 在彩色圖像中, 此值為 '3'. |
0x0116 |
RowsPerStrip |
unsigned short/long |
1 |
如果圖像格式沒有經過壓縮 并且 圖像被分割存儲, 這個值表示每條數據帶存儲了多少行數據 . 如果圖像沒有被分割, 它與ImageLength(0x0101)同值. |
0x0117 |
StripByteConunts |
unsigned short/long |
|
如果圖像格式沒有經過壓縮 并且 圖像被分割存儲, 這個值表示每條數據帶使用了多少字節(jié)的 數據 且 有多個值. 如果圖像沒有被分割, 它只有一個且表示為圖像的所有數據的大小. |
0x011a |
XResolution |
unsigned rational |
1 |
圖像的顯示/打印分辨率. 很多的數字相機都使用1/72英寸的規(guī)格, 但對于個人PC 來講這個值沒有任何意義因為在顯示/打印的時候不使用這個值. |
0x011b |
YResolution |
unsigned rational |
1 |
0x011c |
PlanarConfiguration |
unsigned short |
1 |
如果圖像格式是非壓縮YCbCr的, 這個值表示YCbCr數據的字節(jié)對齊順序. '1', 表示Y/Cb/Cr值是一個 chunky format, 對于每個子采樣像素都是連續(xù)的. '2', 則表示Y/Cb/Cr 值被分割存儲在 Y plane/Cb plane/Cr plane 格式中. |
0x0128 |
ResolutionUnit |
unsigned short |
1 |
XResolution(0x011a)/YResolution(0x011b)的單位. '1' 表示英寸, '2' 表示厘米. |
0x0201 |
JpegIFOffset |
unsigned long |
1 |
當圖像格式是JPEG時, 這個值表示到 JPEG 數據的偏移量. |
0x0202 |
JpegIFByteCount |
unsigned long |
1 |
當圖像格式是JPEG時, 表示JPEG 圖像的數據大小. |
0x0211 |
YCbCrCoefficients |
unsigned rational |
3 |
當圖像格式是YCbCr時, 它表示轉換成RGB格式的一個常量值. 通常是'0.299/0.587/0.114'. |
0x0212 |
YCbCrSubSampling |
unsigned short |
2 |
當圖像格式是YCbCr時 并且 使用子采樣(色度數據的剪切值, 所有的數字相機都使用)時, 這個值表示有多少個色度數據被采樣了. 首先第一個值表示水平的, 下一個值表示垂直的 采樣率. |
0x0213 |
YCbCrPositioning |
unsigned short |
1 |
當圖像格式是YCbCr時 并且 使用子采樣(色度數據的剪切值, 所有的數字相機都使用)時, 這個值定義了被采樣的像素陣列的色度采樣點. '1' 表示像素陣列的中心, '2' 表示基準點(0,0). |
0x0214 |
ReferenceBlackWhite |
unsigned rational |
6 |
表示黑點/白點的參考值. 在 YCbCr 格式的情況下, 前兩個表示了Y的黑/白, 下兩個是 Cb, 最后兩個是 Cr. 在 RGB 的情況下, 前兩個表示R的黑/白, 下兩個是 G, 最后兩個是 B. |
Misc Tags |
標簽號 |
標簽名 |
格式 |
組件數 |
描述 |
0x00fe |
NewSubfileType |
unsigned long |
1 |
|
0x00ff |
SubfileType |
unsigned short |
1 |
|
0x012d |
TransferFunction |
unsigned short |
3 |
|
0x013b |
Artist |
ascii string |
|
|
0x013d |
Predictor |
unsigned short |
1 |
|
0x0142 |
TileWidth |
unsigned short |
1 |
|
0x0143 |
TileLength |
unsigned short |
1 |
|
0x0144 |
TileOffsets |
unsigned long |
|
|
0x0145 |
TileByteCounts |
unsigned short |
|
|
0x014a |
SubIFDs |
unsigned long |
|
|
0x015b |
JPEGTables |
undefined |
|
|
0x828d |
CFARepeatPatternDim |
unsigned short |
2 |
|
0x828e |
CFAPattern |
unsigned byte |
|
|
0x828f |
BatteryLevel |
unsigned rational |
1 |
|
0x83bb |
IPTC/NAA |
unsigned long |
|
|
0x8773 |
InterColorProfile |
undefined |
|
|
0x8824 |
SpectralSensitivity |
ascii string |
|
|
0x8825 |
GPSInfo |
unsigned long |
1 |
|
0x8828 |
OECF |
undefined |
|
|
0x8829 |
Interlace |
unsigned short |
1 |
|
0x882a |
TimeZoneOffset |
signed short |
1 |
|
0x882b |
SelfTimerMode |
unsigned short |
1 |
|
0x920b |
FlashEnergy |
unsigned rational |
1 |
|
0x920c |
SpatialFrequencyResponse |
undefined |
|
|
0x920d |
Noise |
undefined |
|
|
0x9211 |
ImageNumber |
unsigned long |
1 |
|
0x9212 |
SecurityClassification |
ascii string |
1 |
|
0x9213 |
ImageHistory |
ascii string |
|
|
0x9214 |
SubjectLocation |
unsigned short |
4 |
|
0x9215 |
ExposureIndex |
unsigned rational |
1 |
|
0x9216 |
TIFF/EPStandardID |
unsigned byte |
4 |
|
0xa20b |
FlashEnergy |
unsigned rational |
1 |
|
0xa20c |
SpatialFrequencyResponse |
unsigned short |
1 |
|
0xa214 |
SubjectLocation |
unsigned short |
1 |
|
下面是各廠商的Makernote的規(guī)格說明,但由于下面所提及的相機太過于古老,不準備全部翻譯。
下面是根據Peter Esherick解析出來的Olympus D450Z(C-920Z)的數據. 奧林帕斯的數字相機的MakerNote開始于 ASCII 字符串 "OLYMP". 數據格式跟IFD一樣, 但是它是從偏移量 0x07 開始. 實際的數據結構的例子如下.
:0000: 4F 4C 59 4D 50 00 01 00-0B 00 00 02 04 00 03 00 OLYMP...........
:0010: 00 00 0E 04 00 00 01 02-03 00 01 00 00 00 03 00 ................
標簽號 |
標簽名 |
格式 |
組件數 |
值 |
0x0200 |
SpecialMode |
Unsigned Long |
3 |
表示照片的拍攝模式. 第一個值的意思是 0=正常, 1=未知, 2=快速, 3=全景. 第二個值意思是序列號, 第三個值表示全景的方向 1=從左到右, 2=從右到左, 3=從下到上, 4=從上到下. |
0x0201 |
JpegQual |
Unsigned Short |
1 |
表示JPEG 的質量. 1=SQ,2=HQ,3=SHQ. |
0x0202 |
Macro |
Unsigned Short |
1 |
表示是否是宏模式. 0=正常, 1=宏. |
0x0203 |
Unknown |
Unsigned Short |
1 |
未知 |
0x0204 |
DigiZoom |
Unsigned Rational |
1 |
表示數字相機的放大率. 0=正常, 2=數字2倍變焦. |
0x0205 |
Unknown |
Unsigned Rational |
1 |
未知 |
0x0206 |
Unknown |
Signed Short |
6 |
未知 |
0x0207 |
SoftwareRelease |
Ascii string |
5 |
表示固件版本. |
0x0208 |
PictInfo |
Ascii string |
52 |
包含 ASCII 格式的數據如 [PictureInfo]. 它跟老的奧林帕斯數碼相機(沒有采用Exif 數據格式, 如C1400/C820/D620/D340等)采用相同的數據格式. |
0x0209 |
CameraID |
Undefined |
32 |
包含CameraID 的數據, 用戶可以使用客戶端工具來改變它的內容 |
0x0f00 |
DataDump |
Unsigned Long |
30 |
未知 |
Nikon相機的MakerNote有兩種格式. E700/E800/E900/E900S/E910/E950相機開始于 ASCII 字符串 "Nikon". 數據格式與IFD一樣, 但是它從偏移地址0x08處開始. 除了開始字符串 之外這跟奧林帕斯相機的一樣. 實際的數據結構的例子如下表示.
:0000: 4E 69 6B 6F 6E 00 01 00-05 00 02 00 02 00 06 00 Nikon...........
:0010: 00 00 EC 02 00 00 03 00-03 00 01 00 00 00 06 00 ................
標簽號. |
標簽名 |
格式 |
組件數 |
值 |
0x0002 |
Unknown |
Ascii string |
6 |
未知. E900/E900S/E910:"09.41", 其他的是:"08.00". |
0x0003 |
Quality |
Unsigned short |
1 |
表示圖像的質量設置. 在E900相機中, 1:VGA 基本, 2:VGA 正常, 3:VGA 好, 4:SXGA 基本, 5:SXGA 正常, 6:SXGA 好 |
0x0004 |
Color Mode |
Unsigned short |
1 |
1:彩色, 2:黑白. |
0x0005 |
Image Adjustment |
Unsigned short |
1 |
0:正常, 1:明亮+, 2:明亮-, 3:對比+, 4:對比-. |
0x0006 |
CCD Sensitivity |
Unsigned short |
1 |
0:ISO80, 2:ISO160, 4:ISO320, 5:ISO100 |
0x0007 |
White balance |
Unsigned short |
1 |
0:自動, 1:預設, 2:日光, 3:熒光燈, 4:白熾燈, 5:陰天, 6:速度光(SpeedLight) |
0x0008 |
Focus |
Unsigned rational |
1 |
如果是無窮遠對焦, 此值為 '1/0'. |
0x0009 |
Unknown |
Ascii string |
20 |
未知 |
0x000a |
Digital Zoom |
Unsigned rational |
1 |
'160/100' 表示 1.6x 數碼變焦, '0/100' 表示沒有采用數碼變焦 (僅僅是光學變焦). |
0x000b |
Converter |
Unsigned short |
1 |
如果使用尼康的魚眼鏡頭, 此值是 '1'. |
0x0f00 |
Unknown |
Unsigned long |
25~30 |
未知 |
在E990像集中, 沒有Ascii 字符串. 就想通常的 IFD (如. IFD0, SubIFD)一樣, 從數據的第一個 字節(jié)開始就是IFD . Nikon D1 也使用這個格式. 實際數據結構的例子如下表示.
:0000: 10 00 01 00 07 00 04 00-00 00 00 01 00 00 02 00 ................
:0010: 03 00 02 00 00 00 00 00-64 00 03 00 02 00 06 00 ........d.......
以下數據由 Max Lyons 解析.
Tag No. |
Tag Name |
Format |
CompoNo |
Value |
0x0001 |
Unknown |
Undefined |
4 |
Unknown. Always "0100". version? |
0x0002 |
ISO Setting |
Unsigned short |
2 |
0,100=ISO 100 0,200=ISO200 0,400=ISO400 etc. |
0x0003 |
Color Mode |
Ascii string |
varies |
"COLOR", "B&W" |
0x0004 |
Quality |
Ascii string |
varies |
"NORMAL", "FINE", "BASIC" |
0x0005 |
Whitebalance |
Ascii string |
varies |
"AUTO", "WHITE PRESET" etc. |
0x0006 |
Image Sharpening |
Ascii string |
varies |
"AUTO", "HIGH" etc. |
0x0007 |
Focus Mode |
Ascii string |
varies |
"AF-S" means Single AF, "AF-C" means Continuous AF. |
0x0008 |
Flash Setting |
Ascii string |
varies |
"NORMAL", "RED-EYE" etc. |
0x000a |
Unknown |
Unsigned rational |
1 |
Unknown, Always '8832/1000'? |
0x000f |
ISO Selection |
Ascii string |
varies |
"MANUAL":User selected, "AUTO":Automatically selected. |
0x0080 |
Image Adjustment |
Ascii string |
varies |
"AUTO", "NORMAL", "CONTRAST(+)" etc. |
0x0082 |
Adapter |
Ascii string |
varies |
"OFF", "FISHEYE 2", "WIDE ADAPTER" etc. |
0x0085 |
Manual Focus Distance |
Unsigned rational |
1 |
Distance in Meters if focus was manually selected, otherwise 0 |
0x0086 |
Digital Zoom |
Unsigned rational |
1 |
'100/100' means no digital zoom (optical zoom only), '140/100' means 1.4x digital zoom. |
0x0088 |
AF Focus Position |
Undefined |
4 |
'0,0,0,0':Center, '0,1,0,0':Top, '0,2,0,0':Bottom, '0,3,0,0':Left, '0,4,0,0':right |
0x0010 |
Data Dump |
Undefined |
174 |
Unknown. |
Casio started to use Exif format from QV2000/QV8000. Casio's MakerNote format is the same as usual IFD (e.g. IFD0, SubIFD0). Example of actual data structure is shown below.
:0000: 00 14 00 01 00 03 00 00-00 01 00 0A 00 00 00 02 ................
:0010: 00 03 00 00 00 01 00 03-00 00 00 03 00 03 00 00 ................
The data below is analyzed by Eckhard Henkel .
Tag No. |
Tag Name |
Format |
CompoNo |
Value |
0x0001 |
RecordingMode |
Unsigned Short |
1 |
1:Single Shutter, 2:Panorama, 3:Night Scene, 4:Portrait, 5:Landscape |
0x0002 |
Quality |
Unsigned Short |
1 |
1:Economy, 2:Normal, 3:Fine |
0x0003 |
Focusing Mode |
Unsigned Short |
1 |
2:Macro, 3:Auto Focus, 4:Manual Focus, 5:Infinity |
0x0004 |
Flash Mode |
Unsigned Short |
1 |
1:Auto, 2:On, 3:Off, 4:Red Eye Reduction |
0x0005 |
Flash Intensity |
Unsigned Short |
1 |
11:Weak, 13:Normal, 15:Strong |
0x0006 |
Object distance |
Unsigned Long |
1 |
Object distance in [mm] |
0x0007 |
White Balance |
Unsigned Short |
1 |
1:Auto, 2:Tungsten, 3:Daylight, 4:Fluorescent, 5:Shade, 129:Manual |
0x0008 |
Unknown |
Unsigned short |
1 |
Unknown |
0x0009 |
Unknown |
Unsigned short |
1 |
Unknown |
0x000a |
Digital Zoom |
Unsigned Long |
1 |
0x10000(65536):'Off', 0x10001(65537):'2X Digital Zoom' |
0x000b |
Sharpness |
Unsigned Short |
1 |
0:Normal, 1:Soft, 2:Hard |
0x000c |
Contrast |
Unsigned Short |
1 |
0:Normal, 1:Low, 2:High |
0x000d |
Saturation |
Unsigned Short |
1 |
0:Normal, 1:Low, 2:High |
0x000e |
Unknown |
Unsigned short |
1 |
Unknown |
0x000f |
Unknown |
Unsigned short |
1 |
Unknown |
0x0010 |
Unknown |
Unsigned short |
1 |
Unknown |
0x0011 |
Unknown |
Unsigned long |
1 |
Unknown |
0x0012 |
Unknown |
Unsigned short |
1 |
Unknown |
0x0013 |
Unknown |
Unsigned short |
1 |
Unknown |
0x0014 |
CCD Sensitivity |
Unsigned short |
1 |
QV3000: 64:Normal, 125:+1.0, 250:+2.0, 244:+3.0 QV8000/2000: 80:Normal, 100:High |
Fujifilm's digicam added the MakerNote tag from the Year2000's model (e.g.Finepix1400,Finepix4700). It uses IFD format and start from ASCII character 'FUJIFILM', and next 4 bytes(value 0x000c) points the offset to first IFD entry. Example of actual data structure is shown below.
:0000: 46 55 4A 49 46 49 4C 4D-0C 00 00 00 0F 00 00 00 :0000: FUJIFILM........
:0010: 07 00 04 00 00 00 30 31-33 30 00 10 02 00 08 00 :0010: ......0130......
There are two big differences to the other manufacturers.
- Fujifilm's Exif data uses Motorola align, but MakerNote ignores it and uses Intel align.
- The other manufacturer's MakerNote counts the "offset to data" from the first byte of TIFF header (same as the other IFD), but Fujifilm counts it from the first byte of MakerNote itself.
I think it's a BUG, but it can't be helped now... The data below is analyzed at Fujifilm FinePix4900Z.
Tag No. |
Tag Name |
Format |
CompoNo |
Value |
0x0000 |
Version |
Undefined |
4 |
Version of MakerNote information. At present, value is "0130". |
0x1000 |
Quality |
Ascii string |
8 |
Quality setting. Ascii string "BASIC","NORMAL","FINE" |
0x1001 |
Sharpness |
Unsigned Short |
1 |
Sharpness setting. 1or2:soft, 3:normal, 4or5:hard. |
0x1002 |
White Balance |
Unsigned Short |
1 |
White balance setting. 0:Auto, 256:Daylight, 512:Cloudy, 768:DaylightColor-fluorescence, 769:DaywhiteColor-fluorescence, 770:White-fluorescence, 1024:Incandenscense, 3840:Custom white balance. |
0x1003 |
Color |
Unsigned Short |
1 |
Chroma saturation setting. 0:normal(STD), 256:High, 512:Low(ORG). |
0x1004 |
Tone |
Unsigned Short |
1 |
Contrast setting. 0:normal(STD), 256:High(HARD), 512:Low(ORG). |
0x1010 |
Flash Mode |
Unsigned Short |
1 |
Flash firing mode setting. 0:Auto, 1:On, 2:Off, 3:Red-eye reduction. |
0x1011 |
Flash Strength |
Signed Rational |
1 |
Flash firing strength compensation setting. Unit is APEX(EV) and value is -6/10, -3/10, 0/10, 3/10, 6/10 etc. |
0x1020 |
Macro |
Unsigned Short |
1 |
Macro mode setting. 0:Off, 1:On. |
0x1021 |
Focus mode |
Unsigned short |
1 |
Focusing mode setting. 0:Auto focus, 1:Manual focus. |
0x1030 |
SlowSync. |
Unsigned short |
1 |
Slow synchro mode setting. 0:Off, 1:On. |
0x1031 |
Picture Mode |
Unsigned short |
1 |
Picture mode setting. 0:Auto, 1:Portrait scene, 2:Landscape scene, 4:Sports scene, 5:Night scene, 6:Program AE, 256:Aperture prior AE, 512:Shutter prior AE, 768:Manual exposure. |
0x1032 |
unknown |
Unsigned Short |
1 |
Unknown |
0x1100 |
ContTake/Bracket |
Unsigned Short |
1 |
Continuous taking or auto bracketting mode setting. 0:off, 1:on. |
0x1200 |
unknown |
Unsigned Short |
1 |
Unknown |
0x1300 |
Blur warning |
Unsigned Short |
1 |
Blur warning status. 0:No blur warning, 1:Blur warning. |
0x1301 |
Focus warning |
Unsigned short |
1 |
Auto Focus warning status. 0:Auto Focus good, 1:Out of focus. |
0x1302 |
AE warning |
Unsigned short |
1 |
Auto Exposure warning status. 0:AE good, 1:Over exposure (>1/1000s,F11). |
The data below was primarily analysed by David Burren and the master version of this information is available at: http://www.burren.cx/david/canon.html. Please send any updates to David. This document is based on his Rev.1.11(2001/01/30) of document.
Canon's MakerNote data is in IFD format, starting at offset 0.
Some of these tags and fields are only produced on cameras such as the EOS D30, but (to current observation) all this is valid for all Canon digicams (at least since the A50). If the tag is not found, or is shorter than shown here, it simply means that data is not supported by that camera.
Tag No. |
Tag Name |
Format |
CompoNo |
Value |
0x0 |
Unknown |
Unsigned Short |
6 |
Always 0 |
0x1 |
Unknown |
Unsigned Short |
varies |
Offset within tag |
Meaning |
0 |
Length of tag in bytes (i.e. twice the number of shorts) |
1 |
Macro mode |
1: macro 2: normal
|
2 |
If non-zero, length of self-timer in 10ths of a second |
3 |
unknown |
4 |
Flash mode |
0: flash not fired 1: auto 2: on 3: red-eye reduction 4: slow synchro 5: auto + red-eye reduction 6: on + red-eye reduction 16: external flash (not set on D30) |
5 |
Continuous drive mode |
0: single or timer (see field 2) 1: continuous |
6 |
unknown |
7 |
Focus Mode |
0: One-Shot 1: AI Servo 2: AI Focus 3: MF 4: Single (but check field 32) 5: Continuous 6: MF |
8, 9 |
unknown |
10 |
Image size |
0: large 1: medium 2: small |
11 |
"Easy shooting" mode |
0: Full Auto 1: Manual 2: Landscape 3: Fast Shutter 4: Slow Shutter 5: Night 6: B&W 7: Sepia 8: Portrait 9: Sports 10: Macro / Close-Up 11: Pan Focus |
12 |
unknown |
13 |
Contrast |
0xffff: low 0x0000: normal 0x0001: high |
14 |
Saturation |
0xffff: low 0x0000: normal 0x0001: high |
15 |
Sharpness |
0xffff: low 0x0000: normal 0x0001: high |
16 |
ISO |
If zero, use ISOSpeedRatings EXIF tag instead 15: auto 16: 50 17: 100 18: 200 19: 400 |
17 |
Metering mode |
3: Evaluative 4: Partial 5: Center-weighted |
18 |
unknown |
19 |
AF point selected |
0x3000: none (MF) 0x3001: auto-selected 0x3002: right 0x3003: center 0x3004: left |
20 |
Exposure mode |
0: "Easy shooting" (use field 11) 1: Program 2: Tv-priority 3: Av-priority 4: Manual 5: A-DEP |
21, 22 |
unknown |
23 |
"long" focal length of lens (in "focal units") |
24 |
"short" focal length of lens (in "focal units") |
25 |
"focal units" per mm |
26 - 28 |
unknown |
29 |
Flash details |
Bits 15..0: 14: external E-TTL 13: internal flash 11: FP sync used 4: FP sync enabled other bits unknown |
30 - 31 |
unknown |
32 |
Focus mode |
G1 seems to use this in preference to field 7 0: Single 1: Continuous |
|
0x3 |
Unknown |
Unsigned Short |
4 |
unknown |
0x4 |
Unknown |
Unsigned Short |
varies |
Offset within tag |
Meaning |
0 |
Length of tag in bytes (i.e. twice the number of shorts) |
1 - 6 |
unknown |
7 |
White balance |
0: auto 1: Sunny 2: Cloudy 3: Tungsten 4: Flourescent 5: Flash 6: Custom |
8 |
unknown |
9 |
Sequence number (if in a continuous burst) |
10 - 13 |
unknown |
14 |
AF point used |
Only set in One-Shot mode? If none used, AF failed or manual focus was used (e.g. on a lens with full-time manual focus) Bits 15..0: 15-12: number of available focus points 2: left 1: center 0: right |
15 |
Flash bias |
0xffc0: -2 EV 0xffcc: -1.67 EV 0xffd0: -1.50 EV 0xffd4: -1.33 EV 0xffe0: -1 EV 0xffec: -0.67 EV 0xfff0: -0.50 EV 0xfff4: -0.33 EV 0x0000: 0 EV 0x000c: 0.33 EV 0x0010: 0.50 EV 0x0014: 0.67 EV 0x0020: 1 EV 0x002c: 1.33 EV 0x0030: 1.50 EV 0x0034: 1.67 EV 0x0040: 2 EV |
16 - 18 |
unknown |
19 |
Subject Distance |
Units are either 0.01m or 0.001m (both have been observed). Still investigating. In any case, the SubjectDistance EXIF tag is set by Canon cameras. |
|
0x6 |
Image type |
Ascii string |
32 |
e.g.: "IMG:EOS D30 JPEG" Has trailing whitespace. |
0x7 |
Firmware version |
Ascii string |
24 |
May have trailing NULs and whitespace. |
0x8 |
Image Number |
Unsigned Long |
1 |
Normally reported as FFF-XXXX. FFF is this value divided by 1000, XXXX is this value mod 1000. |
0x9 |
Owner name |
Ascii string |
32 |
May have trailing NULs and whitespace. |
0xa |
Unknown |
Unsigned Short |
varies |
unknown |
0xc |
Camera serial number |
Unsigned Long |
1 |
High 16 bits are printed as a 4-digit hex number. Low 16 bits are printed as a 5-digit decimal number. These are concatenated to form the serial number. Example printf() format string would be "%04X%05d". |
0xd |
Unknown |
Unsigned Short |
varies |
unknown |
0xf |
Custom Functions |
Unsigned Short |
varies |
First short is the number of bytes in the tag (i.e. twice the number of shorts) For each other value: the top 8 bits are the C.Fn number, and the lower 8 bits are the value. |
EOS D30 Custom Functions
C.Fn |
Name |
Value |
1 |
Long exposure noise reduction |
0: Off 1: On |
2 |
Shutter/AE-lock buttons |
0: AF/AE lock 1: AE lock/AF 2: AF/AF lock 3: AE+release/AE+AF |
3 |
Mirror lockup |
0: Disable 1: Enable |
4 |
Tv/Av and exposure level |
0: 1/2 stop 1: 1/3 stop |
5 |
AF-assist light |
0: On (auto) 1: Off |
6 |
Shutter speed in Av mode |
0: Automatic 1: 1/200 (fixed) |
7 |
AEB sequence/auto cancellation |
0: 0, -, + / Enabled 1: 0, -, + / Disabled 2: -, 0, + / Enabled 3: -, 0, + / Disabled |
8 |
Shutter curtain sync |
0: 1st-curtain sync 1: 2nd-curtain sync |
9 |
Lens AF stop button Fn. Switch |
0: AF stop 1: Operate AF 2: Lock AE and start timer |
10 |
Auto reduction of fill flash |
0: Enable 1: Disable |
11 |
Menu button return position |
0: Top 1: Previous (volatile) 2: Previous |
12 |
SET button func. when shooting |
0: Not assigned 1: Change quality 2: Change ISO speed 3: Select parameters |
13 |
Sensor cleaning |
0: Disable 1: Enable |
rev. 1.4
- 追加了佳能的Makernote
- 在富士的makernote中增加了色彩/色調 標簽
rev. 1.3
- 追加了 Exif2.1 規(guī)格
- 添加了富士的 Makernote
rev. 1.2
- 追加了 DCF 規(guī)格
- 追加了Interoperability IFD
- 添加了尼康/卡西歐的Makernote
rev. 1.1
- 在TIFF頭的標簽標記中追加了字節(jié)順序的解釋
- 為"unsigned short/long"修正了一些標簽的數據格式
- 修正了FocalPlaneResolutionUnit的值
- 附錄1: 奧林帕斯的MakerNote
rev. 1.0
我想要感謝; Daniel Switkin: 標簽標記的字節(jié)序, ImageWidth/ImageLeng格式 Peter Esherick: 奧林帕斯的MakerNote Matthias Wandel: FocalPlaneResolutionUnit的值 Max Lyons: 尼康的Makernote ...它的 網頁在這里 Eckhard Henkel: 卡西歐的Makernote ...它的 網頁在這里 David Burren: 富士的FocalPlaneResolutionUnit的值 / 佳能的Makernote ...它的 網頁在這里
Feedback
# re: Exif文件格式描述 回復 更多評論
2012-05-21 21:36 by
太好了~
# re: Exif文件格式描述[未登錄] 回復 更多評論
2013-06-09 12:18 by
這個真的是太好了,收藏起來。
# re: Exif文件格式描述[未登錄] 回復 更多評論
2016-01-19 15:43 by
不能更棒了!!!
|