• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            桃源谷

            心靈的旅行

            人生就是一場(chǎng)旅行,不在乎旅行的目的地,在乎的是沿途的風(fēng)景和看風(fēng)景的心情 !
            posts - 32, comments - 42, trackbacks - 0, articles - 0
              C++博客 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

            Exif文件格式描述

            Posted on 2010-02-23 09:53 lymons 閱讀(19640) 評(píng)論(7)  編輯 收藏 引用 所屬分類: 文章翻譯
            該文檔的日文版     該文檔的 英文版   翻譯 : Lymons Lau , l y m o n s @ g m a i l . c o m

            Exif文件格式描述

            當(dāng)前,幾乎新型的數(shù)碼相機(jī)都使用Exif文件格式來存儲(chǔ)圖像. 它的規(guī)格是由 JEIDA 來制定的, 但是在互聯(lián)網(wǎng)上還沒有開放的文檔可供瀏覽. 因此我根據(jù)從互聯(lián)網(wǎng)上所能得到一些開放資料做成了這份Exif格式的描述文檔.

            注: 現(xiàn)在我們能得到官方的文檔 Exif2.1 ,它來自 PIMA 的web站點(diǎn).

            ISO 正致力于建立 DCF (Design rule for Camera File system/相機(jī)文件系統(tǒng)設(shè)計(jì)規(guī)則) 規(guī)格. 所有的數(shù)碼相機(jī)的制造商正準(zhǔn)備遵循這份規(guī)則并且已經(jīng)在他們的最新的數(shù)字相機(jī)上使用了. DCF規(guī)格為數(shù)字相機(jī)定義了完整的文件系統(tǒng); 如,目錄結(jié)構(gòu), 文件命名方法, 字符集和文件格式等等. 這里的文件格式就是基于 Exif2.1 規(guī)格制定的.

            這份文檔基本上是基于 Exif2.1/DCF 規(guī)格做成的, 如果你有關(guān)于 'unknown' 條目的信息或者是發(fā)現(xiàn)了勘誤, 請(qǐng) e-mail 我, TsuruZoh Tachibanaya , t s u r u z o h @ b a . w a k w a k . c o m


            這是一份免費(fèi)的文檔, 你可以使用于任何目的(商業(yè)/非商業(yè))下. 文檔里面提到的所有的商業(yè)名稱都是商標(biāo)或者被各自持有者所注冊(cè)的商標(biāo).

            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?

            基本上, Exif文件格式與JPEG 文件格式相同. Exif按照J(rèn)PEG的規(guī)格在JPEG中插入一些 圖像/數(shù)字相機(jī) 的信息數(shù)據(jù)以及縮略圖像. 于是你能通過與JPEG兼容的互聯(lián)網(wǎng)瀏覽器/圖片瀏覽器/圖像處理等一些軟件 來查看Exif格式的圖像文件. 就跟瀏覽通常的JPEG圖像文件一樣.

            JPEG格式和標(biāo)記

            每一個(gè)JPEG文件的內(nèi)容都開始于一個(gè)二進(jìn)制的值 '0xFFD8', 并結(jié)束與二進(jìn)制值'0xFFD9'. 在JPEG的數(shù)據(jù) 中有好幾種類似于二進(jìn)制 0xFFXX 的數(shù)據(jù), 它們都統(tǒng)稱作 "標(biāo)記", 并且它們代表了一段JPEG的 信息數(shù)據(jù). 0xFFD8 的意思是 SOI圖像起始(Start of image), 0xFFD9 則表示 EOI圖像結(jié)束 (End of image). 這兩個(gè)特殊的標(biāo)記的后面都不跟隨數(shù)據(jù), 而其他的標(biāo)記在后面則會(huì)附帶數(shù)據(jù). 標(biāo)記的基本 格式如下.

            0xFF+標(biāo)記號(hào)(1個(gè)字節(jié))+數(shù)據(jù)大小描述符(2個(gè)字節(jié))+數(shù)據(jù)內(nèi)容(n個(gè)字節(jié))

            數(shù)據(jù)大小描述符(2個(gè)字節(jié)) 是 "Motorola" 的字節(jié)順序, 數(shù)據(jù)的低位被存放在高地址,也就是 BigEndian. 請(qǐng)注意上面中的 "數(shù)據(jù)內(nèi)容" 中包含他前面的數(shù)據(jù)大小描述符, 如果下面的是一個(gè)標(biāo)記的話;

            FF C1 00 0C

            它就表示這個(gè)標(biāo)記(0xFFC1) 的數(shù)據(jù)占 0x000C(等于12)個(gè)字節(jié). 但是這個(gè)數(shù)據(jù)大小'12' 包含了 "數(shù)據(jù)大小" 描述符, 也就是在0x000C后面它只允許帶有10 個(gè)字節(jié)大小的數(shù)據(jù).

            在JPEG 格式中, 最開始先是用一些標(biāo)記來描述數(shù)據(jù), 然后是放置 SOS數(shù)據(jù)流的起始(Start of stream) 標(biāo)記. 在SOS標(biāo)記的后面才是, 存放JPEG圖像的數(shù)據(jù)流并終結(jié)于EOI標(biāo)記.

            SOI 標(biāo)記 標(biāo)記 XX 的大小=SSSS 標(biāo)記 YY 的大小=TTTT SOS 標(biāo)記 的大小=UUUU 圖像數(shù)據(jù)流 EOI 標(biāo)記
            FFD8 FFXX SSSS DDDD...... FFYY TTTT DDDD...... FFDA UUUU DDDD.... I I I I.... FFD9

            Exif使用的標(biāo)記

            0xFFE0~0xFFEF之間的標(biāo)記被叫做 "應(yīng)用標(biāo)記", 它們?cè)贘PEG圖像解碼中不是必須存在的. 它們被使用于用戶的應(yīng)用程序之中. 例如, 老款的olympus/canon/casio/agfa 數(shù)字相機(jī)使用 JFIF(JPEG文件交換格式/JPEG File Interchange Format)來存儲(chǔ)圖像. JFIF 使用 APP0(0xFFE0) 標(biāo)記來插入數(shù)字相機(jī)的配置信息數(shù)據(jù)和縮略圖.

            Exif也使用應(yīng)用標(biāo)記來插入數(shù)據(jù), 但是Exif 使用 APP1(0xFFE1)標(biāo)記來避免與JFIF格式的 沖突. 且每一個(gè) Exif 文件格式都開始于它, 如;

            SOI 標(biāo)記 APP1 標(biāo)記 APP1 數(shù)據(jù) Other 標(biāo)記
            FFD8 FFE1 SSSS 457869660000 TTTT...... FFXX SSSS DDDD......

            該圖像文件從SOI(0xFFD8) 標(biāo)記開始, 因此它是一個(gè) JPEG 文件. 后面馬上跟著 APP1 標(biāo)記. 而它的所有 Exif數(shù)據(jù)都被存儲(chǔ)在 APP1 數(shù)據(jù)域中. 上面的 "SSSS" 這部分表示 APP1 數(shù)據(jù)域 (Exif data area)的大小. 請(qǐng)注意這里的大小 "SSSS" 包含描述符本身的大小.

            在 "SSSS"后面, 是 APP1 的數(shù)據(jù). 其中第一個(gè)部分是一個(gè)特殊的數(shù)據(jù),它用來標(biāo)識(shí)是否是 Exif, 其值是ASCII 字符 "Exif" 和 兩個(gè)0x00字節(jié) 的組合字符串.

            在 APP1 標(biāo)記域的后面是, 跟隨著其他的 JPEG 標(biāo)記.

            Exif數(shù)據(jù)結(jié)構(gòu)

            Exif的數(shù)據(jù)結(jié)構(gòu) (APP1)大致如下面那樣. 這是"Intel"字節(jié)序的情況, 并且它包含了JPEG 格式的 縮略圖. 就像上面描述的那樣, Exif 數(shù)據(jù)開始于ASCII字符 "Exif" 和2個(gè)字節(jié)的0x00, 后面才是 Exif的數(shù)據(jù). Exif 使用 TIFF 格式來存儲(chǔ)數(shù)據(jù). 想獲取TIFF的更多的細(xì)節(jié)的話, 請(qǐng)參考 .


            FFE1 APP1 標(biāo)記
            SSSS APP1 數(shù)據(jù) APP1 數(shù)據(jù)大小
            45786966 0000 Exif 頭
            49492A00 08000000 TIFF 頭
            XXXX. . . . IFD0 (主圖像) 目錄
            LLLLLLLL 連接到 IFD1
            XXXX. . . . IFD0的數(shù)據(jù)域
            XXXX. . . .    Exif 子IFD 目錄
            00000000 連接結(jié)束
            XXXX. . . . Exif 子IFD的數(shù)據(jù)域
            XXXX. . . .    Interoperability IFD Directory
            00000000 連接結(jié)束
            XXXX. . . . Interoperability IFD的數(shù)據(jù)域
            XXXX. . . . Makernote IFD Directory
            00000000 連接結(jié)束
            XXXX. . . . Makernote IFD的數(shù)據(jù)域
            XXXX. . . . IFD1(縮略圖像) 目錄
            00000000 連接結(jié)束
            XXXX. . . . IFD1的數(shù)據(jù)域
            FFD8XXXX. . . XXXXFFD9 縮略圖像

            TIFF 頭的結(jié)構(gòu)

            TIFF格式中前8個(gè)字節(jié)是 TIFF 頭. 其中最開始的前2個(gè)字節(jié)定義了 TIFF 數(shù)據(jù)的字節(jié)序. 如果這個(gè)值是 0x4949="I I"的話, 就表示按照 "Intel" 的字節(jié)序(Little Endian) 來排列數(shù)據(jù). 如果是 0x4d4d="MM", 則說明按照 "Motorola" 的字節(jié)序(Big Endian)來排列數(shù)據(jù). 例如, 這個(gè)值是'305,419,896' (注意:16進(jìn)制值為0x12345678). 在 Motorola 的 字節(jié)序中, 數(shù)據(jù)存儲(chǔ)時(shí)的排列順序?yàn)?0x12,0x34,0x56,0x78. 而用 Intel 的字節(jié)序的話, 它就是按照 0x78,0x56,0x34,0x12 來排序數(shù)據(jù). 幾乎所有的數(shù)字相機(jī)都是使用 Intel 的字節(jié)序. 不過 Ricoh 使用的是 Motorola 的. Sony 使用的是 Intel 字節(jié)序(除了 D700). Kodak 的DC200/210/240 使用的是 Motorola 字節(jié)序, 但是 DC220/260 使用的是 Intel的, 盡管它們都是使用在 PowerPC的平臺(tái)上! 因此當(dāng)我們需要使用 Exif 數(shù)據(jù)的值的時(shí)候, 我們必須每次都要檢查它的字節(jié)序. 盡管 JPEG 數(shù)據(jù)僅僅是使用 Motorola 字節(jié)序, 但 Exif 卻是允許這兩種字節(jié)序存在的. 我不明白 Exif 為什么不把字節(jié)序修訂成 Motorola的.

            隨后的兩個(gè)字節(jié)是一個(gè)2字節(jié)長(zhǎng)度的固定值 0x002A. 如果數(shù)據(jù)使用 Intel 字節(jié)序, 則這兩個(gè) 字節(jié)的數(shù)據(jù)排列為 "0x2a,0x00". 如果是 Motorola 的, 則是 "0x00,0x2a". TIFF頭的最后的 4個(gè)字節(jié)是到第一個(gè) IFD(圖像文件目錄/Image File Directory, 將在下一節(jié)中描述)的偏移量. 這個(gè)偏移量是指從TIFF頭("II" 或者 "MM")開始, 包含自己偏移量值的本身, 到下一個(gè)IFD為止的 長(zhǎng)度的字節(jié)數(shù). 通常地第一個(gè) IFD 是緊挨著 TIFF 頭出現(xiàn)的, 因此這個(gè)偏移量的值是 '0x00000008'.

            字節(jié)序 標(biāo)簽標(biāo)注 到第一個(gè)IFD的偏移量
            "I I" or "MM" 0x002a 0x00000008

            IFD : 圖像文件目錄

            緊挨著 TIFF 頭, 就是第一個(gè) IFD:圖像文件目錄(Image File Directory). 它包含了圖像 信息的數(shù)據(jù). 在下面的表格中, 前兩個(gè)字節(jié)('EEEE') 表示在IFD中有多少個(gè)目錄項(xiàng)(directory entry) . 它后面存放就是目錄項(xiàng)(每個(gè)項(xiàng)目大小為12字節(jié)) . 在最后一個(gè)目錄項(xiàng)之后, 有 一個(gè)4個(gè)字節(jié)大小的數(shù)據(jù)(表格中'LLLLLLLL' ), 它意味著到下一個(gè)IFD的偏移量. 如果這個(gè) 值是'0x00000000', 則表示它是最后一個(gè)IFD 并且不在跟任何的 IFD 相連接.

            EEEE 目錄項(xiàng)的號(hào)碼
            TTTT ffff NNNNNNNN DDDDDDDD 項(xiàng)目 0
            TTTT ffff NNNNNNNN DDDDDDDD 項(xiàng)目 1
            . . . . . . . . . . . . . . .
            TTTT ffff NNNNNNNN DDDDDDDD 項(xiàng)目 EEEE-1
            LLLLLLLL 到下一個(gè)IFD的偏移量

            上表中的'TTTT'(2個(gè)字節(jié)) 是一個(gè)標(biāo)簽的號(hào)碼, 代表數(shù)據(jù)的種類. 'ffff'(2個(gè)字節(jié))表示 數(shù)據(jù)的格式, 'NNNNNNNN'(4個(gè)字節(jié))表示組件的數(shù)目. 'DDDDDDDD'(4個(gè)字節(jié)) 則是數(shù)據(jù)的 值或者到數(shù)據(jù)值的偏移量.

            數(shù)據(jù)格式

            數(shù)據(jù)格式 (上面表格中的'ffff') 的定義如下表示. "rational" 的意思是說明數(shù)據(jù)的 內(nèi)容是一個(gè)分?jǐn)?shù), 它含有2個(gè)有符號(hào)/無符號(hào)的長(zhǎng)整形(signed/unsigned long integer)值, 并且第一個(gè)值表示的是分子, 第二個(gè)值則是, 分母.
            數(shù)據(jù)的值 1 2 3 4 5 6
            格式 unsigned byte ascii strings unsigned short unsigned long unsigned rational signed byte
            組件的大小(字節(jié)數(shù)) 1 1 2 4 8 1
            數(shù)據(jù)的值 7 8 9 10 11 12
            格式 undefined signed short signed long signed rational single float double float
            組件的大小(字節(jié)數(shù)) 1 2 4 8 4 8

            通過多個(gè)存儲(chǔ)在'NNNNNNNN'數(shù)據(jù)區(qū)的'組件的大小(字節(jié)數(shù))'你能得到所有數(shù)據(jù)的字節(jié)長(zhǎng)度. 如果數(shù)據(jù)的長(zhǎng)度小于4個(gè)字節(jié), 則'DDDDDDDD' 就表示的是標(biāo)簽的值. 如果長(zhǎng)度超過4字節(jié), 則'DDDDDDDD' 里存放的就是所要存儲(chǔ)數(shù)據(jù)的偏移量地址.

            IFD數(shù)據(jù)結(jié)構(gòu)

            在Exif格式中, 第一個(gè)IFD 是IFD0(主圖像IFD), 然后它連接到IFD1(縮略圖IFD) 并且IFD 連接在此結(jié)束. 但是 IFD0/IFD1 不包含任何的數(shù)字相機(jī)的信息例如快門速度, 焦距等. IFD0 總是包含一個(gè)特殊的標(biāo)簽 Exif偏移量(0x8769), 它表示到 Exif子IFD 的偏移量. Exif子IFD 也是一個(gè)IFD 格式化的數(shù)據(jù), 它包含了數(shù)字相機(jī)的信息.

            在擴(kuò)展Exif格式(Exif2.1/DCF)中, Exif子IFD還包含了特殊的標(biāo)簽 Exif Interoperability Offset (0xa005). 這個(gè)偏移量也指向Interoperability IFD. 根據(jù) DCF 規(guī)格, 這個(gè)標(biāo)簽是必須的并且子IFD (主圖像 IFD) 和 IFD1 (縮略圖 IFD) 中可能也會(huì)包含Interoperability IFD. 通常, 僅僅主圖像僅僅有這個(gè)標(biāo)簽.

            另外一些數(shù)字相機(jī)也為Makernote(制造商注釋)使用 IFD 數(shù)據(jù)格式; 這是生產(chǎn)商特定的 魔數(shù)(magic number)區(qū)域. 判斷makernote 是否是IFD 格式是非常困難的, 必須仔細(xì)的 編程. 關(guān)于Makernote的信息請(qǐng)參考附錄.
            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數(shù)據(jù)的開頭部分, 對(duì)它的解讀如下;
            • 前兩個(gè)字節(jié)是 "I I", 所以字節(jié)序是 'Intel'.
            • 在地址0x0004~0x0007處存放的值是 0x08000000, 因此IFD0 從地址 '0x0008'開始
            • 在地址0x0008~0x0009處存放的值是 0x0200, 則表示IFD0有 '2' 個(gè)目錄項(xiàng).
            • 在地址0x000a~0x000b處存放的值是 0x1A01, 它意味著這是一個(gè) XResolution(0x011A) 標(biāo)簽, 表示這是圖像的水平分辨率.
            • 地址0x000c~0x000d處存放的值為 0x0500, 說明數(shù)據(jù)的格式是一個(gè) unsigned rational(0x0005).
            • 地址0x000e~0x0011處存放的值是 0x01000000, 說明組件的數(shù)據(jù)只有 '1'個(gè). Unsigned rational的數(shù)據(jù)大小是8字節(jié)(組件的大小), 因此數(shù)據(jù)的總長(zhǎng)度是 1x8=8字節(jié).
            • 總數(shù)居長(zhǎng)度比4字節(jié)大了, 因此它后面的4個(gè)字節(jié)里面存放的是一個(gè)指向?qū)嶋H數(shù)據(jù)的偏移量地址.
            • 地址0x0012~0x0015處存放的是 0x26000000, 表示XResolution(水平分辨率) 數(shù)據(jù)的存儲(chǔ)地址是0x0026
            • 地址0x0026~0x0029處存放的數(shù)據(jù)是 0x48000000, 說明分子的值為 72, 而地址0x002a~0x002d 處存放的是0x0100000000, 說明分母為 '1'. 因此XResoultion 的值是 72/1.
            • 地址0x0016~0x0017處存放的數(shù)據(jù)為0x6987, 表示下一個(gè)標(biāo)簽是 ExifOffset(0x8769). 這就是 指向 Exif子IFD的偏移量
            • 而它的數(shù)據(jù)格式是 0x0004, 即是一個(gè)無符號(hào)的長(zhǎng)整形(unsigned long integer).
            • 這個(gè)標(biāo)簽只有一個(gè)組件. 無符號(hào)長(zhǎng)整形的數(shù)據(jù)大小是4字節(jié), 因此總數(shù)據(jù)長(zhǎng)度為4字節(jié).
            • 總數(shù)據(jù)長(zhǎng)度是 4字節(jié), 則說明下一個(gè)4字節(jié)的數(shù)據(jù)中存放的是Exif子IFD的偏移量.
            • 地址0x001e~0x0021處存放的是 0x11020000, 則說明Exif子IFD的開始地址是 '0x0211'.
            • 這是最后一個(gè)目錄項(xiàng), 接下來的4個(gè)字節(jié)存放的是下一個(gè)IFD的偏移地址.
            • 地址0x0022~0x0025處存放的是 0x40000000, 就可以知道下一個(gè)IFD的開始地址為 '0x0040'

            縮略圖

            Exif格式中包含縮略圖像(除了Ricoh RDC-300Z). 通常它被放到IFD1的后面. 縮略圖有 3 種格式; JPEG 格式(JPEG 使用YCbCr), RGB TIFF 格式, YCbCr TIFF 格式. 在Exif2.1之后推薦使用JPEG 格式和160x120像素的尺寸. 根據(jù) DCF 規(guī)格, 縮略圖像必須 使用JPEG 格式以及圖像的尺寸 固定為160x120 像素.

            JPEG格式的縮略圖

            IFD1中的標(biāo)簽Compression(0x0103)如果是 '6', 則縮略圖就是JPEG格式. 幾乎所有的 Exif圖像中縮略圖都使用JPEG 格式. 在這種情況下, 你能從IFD1的JpegIFOffset(0x0201) 標(biāo)簽中得到縮略圖的偏移量, 從標(biāo)簽JpegIFByteCount(0x0202)中得到縮略圖的大小. 數(shù)據(jù)格式則是普通的 JPEG 格式, 也就是從0xFFD8處開始在0xFFD9處結(jié)束.

            TIFF格式的縮略圖

            IFD1的標(biāo)簽Compression(0x0103)如果是 '1', 則縮略圖的格式就沒有經(jīng)過壓縮的 (就是TIFF 圖像). 縮略圖數(shù)據(jù)的開始點(diǎn)是標(biāo)簽 StripOffset(0x0111) , 縮略圖的尺寸 就是標(biāo)簽 StripByteCounts(0x0117) 之和.

            如果縮略圖使用非壓縮格式并且IFD1中的標(biāo)簽 PhotometricInterpretation(0x0106) 是 '2', 則縮略圖使用了 RGB 格式. 在這種情況下, 你只要簡(jiǎn)單的把數(shù)據(jù)拷貝到計(jì)算機(jī)的RGB格式 中就能看到縮略圖了(如 BMP 格式, 或者拷貝到 VRAM 目錄下). Kodak DC-210/220/260 就使用 這個(gè)格式. 注意TIFF中存儲(chǔ)的像素?cái)?shù)據(jù)是'RGB' 順序的, 而 BMP 里的存儲(chǔ)順序則是 'BGR' .
            如果這個(gè)標(biāo)簽的值是 '6', 縮略圖使用 YCbCr 格式. 如果你想要看到縮略圖的話, 你必須把它 轉(zhuǎn)換成 RGB 格式的. Ricoh RDC4200/4300, Fuji DS-7/300 和 DX-5/7/9 使用的是這種格式 (較新的 RDC5000/MX-X00 系列使用的是 JPEG). 在下一節(jié)中主要描述的就是Fuji DS相機(jī)的縮略圖 的圖像轉(zhuǎn)換. 想要了解更多的信息, 請(qǐng)參考 TIFF6.0 規(guī)格說明.

            在DX-5/7/9的場(chǎng)合, YCbCrSubsampling(0x0212) 的值是 '2,1', PlanarConfiguration(0x011c) 的 值是 '1'. 因此這種圖像的數(shù)據(jù)排列是下面的那樣.

            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). . . .

            括號(hào)中的數(shù)字代表的是像素坐標(biāo). DX 系列中000YCbCrCoefficients(0x0211) 的值是 '0.299/0.587/0.114', ReferenceBlackWhite(0x0214) 的值是 '0,255,128,255,128,255'. 于是把 Y/Cb/Cr 轉(zhuǎn)換成 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)計(jì)算出B(1,0)/R(1,0)/G(1,0). 根據(jù)ImageWidth(0x0100) 和 ImageLength(0x0101)的值可以重復(fù)這些轉(zhuǎn)換.

            Exif/TIFF使用的標(biāo)簽數(shù)

            下面顯示了 Exif/TIFF 使用的標(biāo)簽數(shù). 如果這個(gè)標(biāo)簽組件數(shù)目的上限, CompoNo 一欄就代表這一數(shù)值. 如果這個(gè)數(shù)值沒有, 則說明這兒沒有上限值.

            IFD0 (主圖像)使用的標(biāo)簽
            標(biāo)簽號(hào) 標(biāo)簽名 格式 組件數(shù) 描述
            0x010e ImageDescription ascii string
            用來描述圖像. 雙字節(jié)的字符碼不能使用, 如 中文/韓文/日文.
            0x010f Make ascii string
            表示數(shù)字相機(jī)的制造商. 在 Exif 標(biāo)準(zhǔn)中, 這個(gè)標(biāo)簽是可選的, 但是在DCF中它是必需的.
            0x0110 Model ascii string
            表示數(shù)字相機(jī)的模塊代碼. 在 Exif 標(biāo)準(zhǔn)中, 這個(gè)標(biāo)簽是可選的, 但在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
            當(dāng)拍照時(shí), 相機(jī)相對(duì)于場(chǎng)景的方向. 在右邊表示的是'0th row' 以及 '0th column' 在視覺位置上的關(guān)系.
            0x011a XResolution unsigned rational 1 圖像的 顯示/打印 分辨率. 缺省值是 1/72英寸, 但是它沒有意義因?yàn)閭€(gè)人PC在 顯示/打印 圖像的時(shí)候不使用這個(gè)值.
            0x011b YResolution unsigned rational 1
            0x0128 ResolutionUnit unsigned short 1 XResolution(0x011a)/YResolution(0x011b)的單位. '1' 表示沒有單位, '2' 意味著英寸, '3' 表示厘米. 缺省值是 '2'(英寸).
            0x0131 Software ascii string
            顯示固件的版本號(hào)(數(shù)字相機(jī)的內(nèi)部控制軟件).
            0x0132 DateTime ascii string 20 圖像最后一次被修改時(shí)的日期/時(shí)間. 日期的格式是 "YYYY:MM:DD HH:MM:SS"+0x00, 一共 20個(gè)字節(jié). 如果沒有設(shè)置時(shí)鐘或者數(shù)字相機(jī)沒有時(shí)鐘, 則這個(gè)域是用空格來填充. 通常, 它和DateTimeOriginal(0x9003)具有相同的值
            0x013e WhitePoint unsigned rational 2 定義圖像白點(diǎn)(white point/白點(diǎn):在彩色分色、照相或攝影時(shí)作為色彩平衡測(cè)量用途的參考點(diǎn)) 的色度(chromaticity). 如果圖像是用CIE標(biāo)準(zhǔn)照度 D65(著名的是 '光線/daylight'的國際標(biāo)準(zhǔn)), 這個(gè)值是 '3127/10000,3290/10000'.
            0x013f PrimaryChromaticities unsigned rational 6 定義圖像的原始色度. 如果圖像使用 CCIR 推薦 709原始色度, 則這個(gè)值是 '640/1000,330/1000,300/1000,600/1000,150/1000,0/1000'.
            0x0211 YCbCrCoefficients unsigned rational 3 當(dāng)圖像的格式是 YCbCr(JPEG的格式), 這個(gè)值表示轉(zhuǎn)換成 RGB格式的一個(gè)常量. 通常, 這個(gè)值是'0.299/0.587/0.114'.
            0x0213 YCbCrPositioning unsigned short 1 當(dāng)圖像的格式是 YCbCr 并且使用 '子采樣/Subsampling'(色度數(shù)據(jù)的剪切值, 所有的數(shù)字相機(jī)都使用), 定義了subsampling 像素陣列的色度采樣點(diǎn). '1'表示像素陣列的中心, '2' 表示基準(zhǔn)點(diǎn).
            0x0214 ReferenceBlackWhite unsigned rational 6 表示黑點(diǎn)(black point)/白點(diǎn) 的參考值. 在YCbCr 格式中,前兩個(gè)值是 Y的黑點(diǎn)/白點(diǎn), 下兩個(gè)值是 Cb, 最后兩個(gè)值是 Cr. 而在 RGB 格式中, 前兩個(gè)表示R的黑點(diǎn)/白點(diǎn), 下兩個(gè)是 G, 最后兩個(gè)是 B.
            0x8298 Copyright ascii string
            表示版權(quán)信息
            0x8769 ExifOffset unsigned long 1 Exif 子IFD的偏移量


            Exif 子IFD使用的標(biāo)簽
            標(biāo)簽號(hào) 標(biāo)簽名 格式 組件數(shù) 描述
            0x829a ExposureTime unsigned rational 1 曝光時(shí)間 (快門速度的倒數(shù)). 單位是秒.
            0x829d FNumber unsigned rational 1 拍照時(shí)的光圈F-number(F-stop).
            0x8822 ExposureProgram unsigned short 1 拍照時(shí)相機(jī)使用的曝光程序. '1' 表示手動(dòng)曝光, '2' 表示正常程序曝光, '3' 表示光圈優(yōu)先曝光, '4' 表示快門優(yōu)先曝光, '5' 表示創(chuàng)意程序(慢速程序), '6' 表示動(dòng)作程序(高速程序), '7'表示 肖像模式, '8' 表示風(fēng)景模式.
            0x8827 ISOSpeedRatings unsigned short 2 CCD 的感光度, 等效于 Ag-Hr 膠片的速率.
            0x9000 ExifVersion undefined 4 Exif 的版本號(hào). 用4個(gè)ASCII字符來存儲(chǔ). 如果圖片是基于Exif V2.1的, 這個(gè)值是 "0210". 因?yàn)樗皇且粋€(gè)用NULL(0x00)來終結(jié)的字符串,所以這里的類型是 'undefined'.
            0x9003 DateTimeOriginal ascii string 20 照片在被拍下來的日期/時(shí)間. 使用用戶的軟件是不能被修改這個(gè)值的. 日期的格式是 "YYYY:MM:DD HH:MM:SS"+0x00, 一共占用20個(gè)字節(jié). 如果數(shù)字相機(jī)沒有設(shè)置時(shí)鐘或者 數(shù)字相機(jī)沒有時(shí)鐘, 這個(gè)域使用空格來填充. 在Exif標(biāo)準(zhǔn)中, 這個(gè)標(biāo)簽是可選的, 但是在 DCF中是必需的.
            0x9004 DateTimeDigitized ascii string 20 照片被數(shù)字化時(shí)的日期/時(shí)間. 通常, 它與DateTimeOriginal(0x9003)具有相同的值. 數(shù)據(jù)格式是 "YYYY:MM:DD HH:MM:SS"+0x00, 一共占用20個(gè)字節(jié). 如果數(shù)字相機(jī)沒有設(shè)置時(shí)鐘或者 數(shù)字相機(jī)沒有時(shí)鐘, 這個(gè)域使用空格來填充. 在Exif標(biāo)準(zhǔn)中, 這個(gè)標(biāo)簽是可選的, 但是在 DCF中是必需的.
            0x9101 ComponentsConfiguration undefined
            表示的是像素?cái)?shù)據(jù)的順序. 大多數(shù)情況下RGB格式使用 '0x04,0x05,0x06,0x00' 而YCbCr 格式使用 '0x01,0x02,0x03,0x00'. 0x00:并不存在, 其他的對(duì)應(yīng)關(guān)系為 0x01:Y, 0x02:Cb, 0x03:Cr, 0x04:Red, 0x05:Green, 0x06:Bllue.
            0x9102 CompressedBitsPerPixel unsigned rational 1 JPEG (粗略的估計(jì))的平均壓縮率.
            0x9201 ShutterSpeedValue signed rational 1 用APEX表示出的快門速度. 為了轉(zhuǎn)換成原始的 'Shutter Speed'; 則先要計(jì)算2的ShutterSpeedValue次冪, 然后求倒數(shù). 例如, 如果 ShutterSpeedValue 是 '4', 快門速度則是1/(24)=1/16秒.
            0x9202 ApertureValue unsigned rational 1 拍照時(shí)鏡頭的光圈. 單位是 APEX. 為了轉(zhuǎn)換成普通的 F-number(F-stop), 則要先計(jì)算出根號(hào)2 2 (=1.4142)的ApertureValue次冪. 例如, 如果ApertureValue 是 '5', F-number 就等于1.41425 = F5.6.
            0x9203 BrightnessValue signed rational 1 被拍攝對(duì)象的明度, 單位是 APEX. 為了從BrigtnessValue(Bv)計(jì)算出曝光量(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 照片拍攝時(shí)的曝光補(bǔ)償. 單位是APEX(EV).
            0x9205 MaxApertureValue unsigned rational 1 鏡頭的最大光圈值. 你可以通過計(jì)算根號(hào)2的MaxApertureValue次冪來轉(zhuǎn)換成普通的光圈 F-number (跟ApertureValue:0x9202的處理過程一樣).
            0x9206 SubjectDistance signed rational 1 到焦點(diǎn)的距離, 單位是米.
            0x9207 MeteringMode unsigned short 1 曝光的測(cè)光方法. '0' 表示未知, '1' 為平均測(cè)光, '2' 為中央重點(diǎn)測(cè)光, '3' 是點(diǎn)測(cè)光, '4' 是多點(diǎn)測(cè)光, '5' 是多區(qū)域測(cè)光, '6' 部分測(cè)光, '255' 則是其他.
            0x9208 LightSource unsigned short 1 光源, 實(shí)際上是表示白平衡設(shè)置. '0' 意味著未知, '1'是日光, '2'是熒光燈, '3' 白熾燈(鎢絲), '10' 閃光燈, '17' 標(biāo)準(zhǔn)光A, '18' 標(biāo)準(zhǔn)光B, '19' 標(biāo)準(zhǔn)光C, '20' D55, '21' D65, '22' D75, '255' 為其他.
            0x9209 Flash unsigned short 1 '0' 表示閃光燈沒有閃光, '1' 表示閃光燈閃光, '5' 表示閃光但沒有檢測(cè)反射光, '7' 表示閃光且檢測(cè)了反射光.
            0x920a FocalLength unsigned rational 1 拍攝照片時(shí)的鏡頭的焦距長(zhǎng)度. 單位是毫米.
            0x927c MakerNote undefined
            制造商的內(nèi)部數(shù)據(jù). 一些制造商如 Olympus/Nikon/Sanyo 等在這個(gè)區(qū)域中使用IFD 格式的數(shù)據(jù).
            0x9286 UserComment undefined
            存儲(chǔ)用戶的注釋. 這個(gè)標(biāo)簽允許使用兩字節(jié)的德字符或者 unicode. 前8 個(gè)字節(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
            一些數(shù)字相機(jī)每秒能拍攝 2~30 張照片, 但是DateTime/DateTimeOriginal/DateTimeDigitized 標(biāo)簽只能記錄到秒單位的時(shí)間. SubsecTime 標(biāo)簽就是用來記錄秒后面的數(shù)據(jù)(微秒).
            例如, DateTimeOriginal = "1996:09:01 09:15:30", SubSecTimeOriginal = "130", 合并起來的原始的拍攝 時(shí)間就是 "1996:09:01 09:15:30.130"
            0x9291 SubsecTimeOriginal ascii string
            0x9292 SubsecTimeDigitized ascii string
            0xa000 FlashPixVersion undefined 4 存儲(chǔ)FlashPix 的版本信息. 如果圖像數(shù)據(jù)是基于 FlashPix formar Ver.1.0, 則這個(gè)值為 "0100". 因?yàn)樗皇且粋€(gè)用NULL(0x00)來終結(jié)的字符串,所以這里的類型是 'undefined'.
            0xa001 ColorSpace unsigned short 1 定義色彩空間. DCF 圖像必須使用 sRGB 色彩空間因此這個(gè)值總是 '1'. 如果這個(gè)照片使用了 其他的色彩空間, 這個(gè)值是 '65535':未校準(zhǔn)(Uncalibrated).
            0xa002 ExifImageWidth unsigned short/long 1 主圖像的尺寸大小.
            0xa003 ExifImageHeight unsigned short/long 1
            0xa004 RelatedSoundFile ascii string
            如果數(shù)字相機(jī)能夠紀(jì)錄圖像的音頻數(shù)據(jù), 則表示音頻數(shù)據(jù)的名字.
            0xa005 ExifInteroperabilityOffset unsigned long 1 表示這是一個(gè)擴(kuò)展"ExifR98", 細(xì)節(jié)未知. 這個(gè)值經(jīng)常是IFD格式的數(shù)據(jù). 當(dāng)前這兒有兩個(gè) 目錄項(xiàng), 第一個(gè)是 Tag0x0001, 值是"R98", 下一個(gè)是 Tag0x0002, 它的值為 "0100".
            0xa20e FocalPlaneXResolution unsigned rational 1 表示CCD的像素密度. 如果你的相機(jī)是百萬像素的并且是用低分辨率(如VGA模式) 來拍攝照片, 這個(gè)值可以通過照片的分辨率來重新采樣. 在這種情況下, FocalPlaneResolution 就不是CCD的實(shí)際的分辨率.
            0xa20f FocalPlaneYResolution unsigned rational 1
            0xa210 FocalPlaneResolutionUnit unsigned short 1 FocalPlaneXResoluton/FocalPlaneYResolution的單位. '1' 表示沒有單位, '2'是英寸inch, '3' 表示厘米.

            注意:一些Fujifilm的數(shù)碼相機(jī)(如.FX2700,FX2900,Finepix4700Z/40i 等) 使用的值是 '3' 所以它的單位一定是 '厘米' , 但是它們的分辨率單位就變成'8.3mm?'(1/3in.?). 這是Fuji 的 BUG? 從Finepix4900Z 開始這個(gè)值就使用 '2' 了但仍然跟實(shí)際的值不吻合.
            0xa215 ExposureIndex unsigned rational 1 跟ISOSpeedRatings(0x8827)一樣但是數(shù)據(jù)類型是 unsigned rational. 只有Kodak的數(shù)字相機(jī)使用 這個(gè)標(biāo)簽來替代 ISOSpeedRating, 我不知道這是為什么(歷史原因?).
            0xa217 SensingMethod unsigned short 1 表示圖像傳感器單元的類型. '2' 意味著這是一個(gè)芯片顏色區(qū)域傳感器, 幾乎所有的數(shù)字相機(jī)都 使用這個(gè)類型.
            0xa300 FileSource undefined 1 顯示圖像來源. 值 '0x03' 表示圖像源是數(shù)字定格相機(jī).
            0xa301 SceneType undefined 1 表示拍攝場(chǎng)景的類型. 值 '0x01' 表示圖像是通過相機(jī)直接拍攝出來的.
            0xa302 CFAPattern undefined
            表示色彩過濾陣列(CFA) 幾何模式.
            長(zhǎng)度 類型 意義
            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值之間的關(guān)系.
            Filter Color Red Green Blue Cyan Magenta Yellow White
            CFA value 0 1 2 3 4 5 6

            R G
            G B
            例如, 普通的 RGB 過濾器使用左表的副本, 這個(gè)值是 '0x0002,0x0002,0x00,0x01,0x01,0x02'.



            Interoperability IFD使用的標(biāo)簽
            標(biāo)簽號(hào) 標(biāo)簽名 格式 組件號(hào) 描述
            0x0001 InteroperabilityIndex Ascii string 4 如果這個(gè)IFD 是主圖像的 IFD 并且文件內(nèi)容采用的是 ExifR98 v1.0, 那這個(gè)值就是 "R98". 如果是所略圖的, 這個(gè)值則是 "THM".
            0x0002 InteroperabilityVersion Undefined 4 紀(jì)錄interoperability的版本. "0100" 表示版本1.00.
            0x1000 RelatedImageFileFormat Ascii string any 紀(jì)錄圖像文件的文件格式. 這個(gè)值是 ascii 字符串(如. "Exif JPEG Ver. 2.1").
            0x1001 RelatedImageWidth Short or Long 1 紀(jì)錄圖像的大小尺寸.
            0x1001 RelatedImageLength Short or Long 1



            IFD1 (縮略圖)使用的標(biāo)簽
            標(biāo)簽號(hào) 標(biāo)簽名 格式 組件數(shù) 描述
            0x0100 ImageWidth unsigned short/long 1 表示縮略圖的大小.
            0x0101 ImageLength unsigned short/long 1
            0x0102 BitsPerSample unsigned short 3 當(dāng)圖像格式?jīng)]有經(jīng)過壓縮, 這個(gè)值表示每像素的比特位的數(shù)目. 通常這個(gè)值是 '8,8,8'
            0x0103 Compression unsigned short 1 代表壓縮的方式. '1' 表示非壓縮, '6' 表示JPEG 壓縮格式.
            0x0106 PhotometricInterpretation unsigned short 1 表示圖像數(shù)據(jù)組件的色彩空間. '1' 意味著單色, '2'表示 RGB, '6' 表示 YCbCr.
            0x0111 StripOffsets unsigned short/long
            如果圖像格式?jīng)]有經(jīng)過壓縮, 這個(gè)值表示的是到圖像數(shù)據(jù)的偏移量. 在圖像數(shù)據(jù)被分割的 情況下它有多個(gè)值.
            0x0115 SamplesPerPixel unsigned short 1 如果圖像格式?jīng)]有經(jīng)過壓縮, 這個(gè)值表示每個(gè)像素中存儲(chǔ)的組件數(shù)目. 在彩色圖像中, 此值為 '3'.
            0x0116 RowsPerStrip unsigned short/long 1 如果圖像格式?jīng)]有經(jīng)過壓縮 并且 圖像被分割存儲(chǔ), 這個(gè)值表示每條數(shù)據(jù)帶存儲(chǔ)了多少行數(shù)據(jù) . 如果圖像沒有被分割, 它與ImageLength(0x0101)同值.
            0x0117 StripByteConunts unsigned short/long
            如果圖像格式?jīng)]有經(jīng)過壓縮 并且 圖像被分割存儲(chǔ), 這個(gè)值表示每條數(shù)據(jù)帶使用了多少字節(jié)的 數(shù)據(jù) 且 有多個(gè)值. 如果圖像沒有被分割, 它只有一個(gè)且表示為圖像的所有數(shù)據(jù)的大小.
            0x011a XResolution unsigned rational 1 圖像的顯示/打印分辨率. 很多的數(shù)字相機(jī)都使用1/72英寸的規(guī)格, 但對(duì)于個(gè)人PC 來講這個(gè)值沒有任何意義因?yàn)樵陲@示/打印的時(shí)候不使用這個(gè)值.
            0x011b YResolution unsigned rational 1
            0x011c PlanarConfiguration unsigned short 1 如果圖像格式是非壓縮YCbCr的, 這個(gè)值表示YCbCr數(shù)據(jù)的字節(jié)對(duì)齊順序. '1', 表示Y/Cb/Cr值是一個(gè) chunky format, 對(duì)于每個(gè)子采樣像素都是連續(xù)的. '2', 則表示Y/Cb/Cr 值被分割存儲(chǔ)在 Y plane/Cb plane/Cr plane 格式中.
            0x0128 ResolutionUnit unsigned short 1 XResolution(0x011a)/YResolution(0x011b)的單位. '1' 表示英寸, '2' 表示厘米.
            0x0201 JpegIFOffset unsigned long 1 當(dāng)圖像格式是JPEG時(shí), 這個(gè)值表示到 JPEG 數(shù)據(jù)的偏移量.
            0x0202 JpegIFByteCount unsigned long 1 當(dāng)圖像格式是JPEG時(shí), 表示JPEG 圖像的數(shù)據(jù)大小.
            0x0211 YCbCrCoefficients unsigned rational 3 當(dāng)圖像格式是YCbCr時(shí), 它表示轉(zhuǎn)換成RGB格式的一個(gè)常量值. 通常是'0.299/0.587/0.114'.
            0x0212 YCbCrSubSampling unsigned short 2 當(dāng)圖像格式是YCbCr時(shí) 并且 使用子采樣(色度數(shù)據(jù)的剪切值, 所有的數(shù)字相機(jī)都使用)時(shí), 這個(gè)值表示有多少個(gè)色度數(shù)據(jù)被采樣了. 首先第一個(gè)值表示水平的, 下一個(gè)值表示垂直的 采樣率.
            0x0213 YCbCrPositioning unsigned short 1 當(dāng)圖像格式是YCbCr時(shí) 并且 使用子采樣(色度數(shù)據(jù)的剪切值, 所有的數(shù)字相機(jī)都使用)時(shí), 這個(gè)值定義了被采樣的像素陣列的色度采樣點(diǎn). '1' 表示像素陣列的中心, '2' 表示基準(zhǔn)點(diǎn)(0,0).
            0x0214 ReferenceBlackWhite unsigned rational 6 表示黑點(diǎn)/白點(diǎn)的參考值. 在 YCbCr 格式的情況下, 前兩個(gè)表示了Y的黑/白, 下兩個(gè)是 Cb, 最后兩個(gè)是 Cr. 在 RGB 的情況下, 前兩個(gè)表示R的黑/白, 下兩個(gè)是 G, 最后兩個(gè)是 B.


            Misc Tags
            標(biāo)簽號(hào) 標(biāo)簽名 格式 組件數(shù) 描述
            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ī)格說明,但由于下面所提及的相機(jī)太過于古老,不準(zhǔn)備全部翻譯。

            附錄1: 奧林帕斯數(shù)字相機(jī)的MakerNote

            下面是根據(jù)Peter Esherick解析出來的Olympus D450Z(C-920Z)的數(shù)據(jù).

            奧林帕斯的數(shù)字相機(jī)的MakerNote開始于 ASCII 字符串 "OLYMP". 數(shù)據(jù)格式跟IFD一樣, 但是它是從偏移量 0x07 開始. 實(shí)際的數(shù)據(jù)結(jié)構(gòu)的例子如下.
            :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  ................
                

            標(biāo)簽號(hào) 標(biāo)簽名 格式 組件數(shù)
            0x0200 SpecialMode Unsigned Long 3 表示照片的拍攝模式. 第一個(gè)值的意思是 0=正常, 1=未知, 2=快速, 3=全景. 第二個(gè)值意思是序列號(hào), 第三個(gè)值表示全景的方向 1=從左到右, 2=從右到左, 3=從下到上, 4=從上到下.
            0x0201 JpegQual Unsigned Short 1 表示JPEG 的質(zhì)量. 1=SQ,2=HQ,3=SHQ.
            0x0202 Macro Unsigned Short 1 表示是否是宏模式. 0=正常, 1=宏.
            0x0203 Unknown Unsigned Short 1 未知
            0x0204 DigiZoom Unsigned Rational 1 表示數(shù)字相機(jī)的放大率. 0=正常, 2=數(shù)字2倍變焦.
            0x0205 Unknown Unsigned Rational 1 未知
            0x0206 Unknown Signed Short 6 未知
            0x0207 SoftwareRelease Ascii string 5 表示固件版本.
            0x0208 PictInfo Ascii string 52 包含 ASCII 格式的數(shù)據(jù)如 [PictureInfo]. 它跟老的奧林帕斯數(shù)碼相機(jī)(沒有采用Exif 數(shù)據(jù)格式, 如C1400/C820/D620/D340等)采用相同的數(shù)據(jù)格式.
            0x0209 CameraID Undefined 32 包含CameraID 的數(shù)據(jù), 用戶可以使用客戶端工具來改變它的內(nèi)容
            0x0f00 DataDump Unsigned Long 30 未知


            附錄2: 尼康相機(jī)的MakerNote

            Nikon相機(jī)的MakerNote有兩種格式. E700/E800/E900/E900S/E910/E950相機(jī)開始于 ASCII 字符串 "Nikon". 數(shù)據(jù)格式與IFD一樣, 但是它從偏移地址0x08處開始. 除了開始字符串 之外這跟奧林帕斯相機(jī)的一樣. 實(shí)際的數(shù)據(jù)結(jié)構(gòu)的例子如下表示.
            :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 ................
                    

            標(biāo)簽號(hào). 標(biāo)簽名 格式 組件數(shù)
            0x0002 Unknown Ascii string 6 未知. E900/E900S/E910:"09.41", 其他的是:"08.00".
            0x0003 Quality Unsigned short 1 表示圖像的質(zhì)量設(shè)置. 在E900相機(jī)中, 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:對(duì)比+, 4:對(duì)比-.
            0x0006 CCD Sensitivity Unsigned short 1 0:ISO80, 2:ISO160, 4:ISO320, 5:ISO100
            0x0007 White balance Unsigned short 1 0:自動(dòng), 1:預(yù)設(shè), 2:日光, 3:熒光燈, 4:白熾燈, 5:陰天, 6:速度光(SpeedLight)
            0x0008 Focus Unsigned rational 1 如果是無窮遠(yuǎn)對(duì)焦, 此值為 '1/0'.
            0x0009 Unknown Ascii string 20 未知
            0x000a Digital Zoom Unsigned rational 1 '160/100' 表示 1.6x 數(shù)碼變焦, '0/100' 表示沒有采用數(shù)碼變焦 (僅僅是光學(xué)變焦).
            0x000b Converter Unsigned short 1 如果使用尼康的魚眼鏡頭, 此值是 '1'.
            0x0f00 Unknown Unsigned long 25~30 未知


            在E990像集中, 沒有Ascii 字符串. 就想通常的 IFD (如. IFD0, SubIFD)一樣, 從數(shù)據(jù)的第一個(gè) 字節(jié)開始就是IFD . Nikon D1 也使用這個(gè)格式. 實(shí)際數(shù)據(jù)結(jié)構(gòu)的例子如下表示.
            :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.......
                    

            以下數(shù)據(jù)由 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.


            Appendix 3: MakerNote of Casio


            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


            Appendix 4: MakerNote of Fujifilm


            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).

            Appendix 5: MakerNote of Canon

            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中增加了色彩/色調(diào) 標(biāo)簽

            rev. 1.3

            • 追加了 Exif2.1 規(guī)格
            • 添加了富士的 Makernote

            rev. 1.2

            • 追加了 DCF 規(guī)格
            • 追加了Interoperability IFD
            • 添加了尼康/卡西歐的Makernote

            rev. 1.1

            • 在TIFF頭的標(biāo)簽標(biāo)記中追加了字節(jié)順序的解釋
            • 為"unsigned short/long"修正了一些標(biāo)簽的數(shù)據(jù)格式
            • 修正了FocalPlaneResolutionUnit的值
            • 附錄1: 奧林帕斯的MakerNote

            rev. 1.0

            • 第一版發(fā)布

            鳴謝

            我想要感謝;

            Daniel Switkin: 標(biāo)簽標(biāo)記的字節(jié)序, ImageWidth/ImageLeng格式
            Peter Esherick: 奧林帕斯的MakerNote
            Matthias Wandel: FocalPlaneResolutionUnit的值
            Max Lyons: 尼康的Makernote   ...它的 網(wǎng)頁在這里
            Eckhard Henkel: 卡西歐的Makernote   ...它的 網(wǎng)頁在這里
            David Burren: 富士的FocalPlaneResolutionUnit的值 / 佳能的Makernote  ...它的 網(wǎng)頁在這里

            Feedback

            # re: Exif文件格式描述  回復(fù)  更多評(píng)論   

            2012-05-21 21:36 by 技術(shù)白
            太好了~

            # re: Exif文件格式描述[未登錄]  回復(fù)  更多評(píng)論   

            2013-06-09 12:18 by stonexin
            這個(gè)真的是太好了,收藏起來。

            # re: Exif文件格式描述[未登錄]  回復(fù)  更多評(píng)論   

            2016-01-19 15:43 by lily
            不能更棒了!!!
            我的個(gè)人簡(jiǎn)歷第一頁 我的個(gè)人簡(jiǎn)歷第二頁
            青青草原综合久久大伊人精品| 国产毛片久久久久久国产毛片| 久久久精品午夜免费不卡| 久久久久香蕉视频| 久久婷婷五月综合97色一本一本| 国产L精品国产亚洲区久久| 伊人久久大香线蕉综合网站| 狠狠久久亚洲欧美专区| 波多野结衣久久精品| 91精品婷婷国产综合久久| 国产精品乱码久久久久久软件| 久久综合久久久| 久久夜色精品国产网站| 久久成人小视频| 久久精品国产清自在天天线| 久久大香香蕉国产| 国产A级毛片久久久精品毛片| 精品无码久久久久久久久久| 国产Av激情久久无码天堂| 久久精品国产精品亚洲精品| 日韩精品无码久久一区二区三| 四虎国产永久免费久久| 国产产无码乱码精品久久鸭 | 国内精品久久国产| 国产真实乱对白精彩久久| 精品一区二区久久| 日产精品久久久久久久性色| 思思久久精品在热线热| 亚洲国产成人久久综合区| 久久伊人色| 无码人妻少妇久久中文字幕| 久久精品国产色蜜蜜麻豆| 久久久WWW免费人成精品| 久久精品国产清自在天天线| 国产免费久久精品丫丫| 草草久久久无码国产专区| 久久久综合九色合综国产| 久久免费线看线看| 狠狠狠色丁香婷婷综合久久俺| 精品久久久久久国产| 国产99久久久国产精免费|