日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

major头文件_JPEG头文件结构及组成

發(fā)布時間:2025/3/20 编程问答 24 豆豆
生活随笔 收集整理的這篇文章主要介紹了 major头文件_JPEG头文件结构及组成 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

JPEG頭文件結(jié)構(gòu)及組成

2018-11-25

最近在做關(guān)于圖片顯示方面的嵌入式程序.發(fā)現(xiàn)國內(nèi)這方面資料介紹得還是比較少的,所以發(fā)表在這里.

Before the image data is ever loaded when a JPEG image is selected for viewing the markers must be read.? In a JPEG image, the very first marker is the SOI, or Start Of Image, marker.? This is the first "hey, I"m a JPEG" declaration by the file.? The JPEG standard, as written by the Joint Picture Expert"s Group, specified the JPEG interchange format.? This format had several shortcomings for which the JFIF (JPEG File Interchange Format) was an attempted remedy.? The JFIF is the format used by almost all JPEG file readers/writers.? It tells the image readers, "Hey, I"m a JPEG that almost anyone can understand."

Most markers will have additional information following them.? When this is the case, the marker and its associated information is referred to as a "header." ? In a header the marker is immediately followed by two bytes that indicate the length of the information, in bytes, that the header contains.? The two bytes that indicate the length are always included in that count.

A marker is prefixed by FF (hexadecimal).? The marker/header information that follows does not specify all known markers, just the essential ones for baseline JPEG.

A component is a specific color channel in an image.? For instance, an RGB image contains three components; Red, Green, and Blue.

1998 by James R. Weeks

Start of Image (SOI) marker -- two bytes (FFD8)

JFIF marker (FFE0)

length -- two bytes

identifier -- five bytes: 4A, 46, 49, 46, 00 (the ASCII code equivalent of a zero terminated "JFIF" string)

version -- two bytes: often 01, 02

the most significant byte is used for major revisions

the least significant byte for minor revisions

units -- one byte: Units for the X and Y densities

0 => no units, X and Y specify the pixel aspect ratio

1 => X and Y are dots per inch

2 => X and Y are dots per cm

Xdensity -- two bytes

Ydensity -- two bytes

Xthumbnail -- one byte: 0 = no thumbnail

Ythumbnail -- one byte: 0 = no thumbnail

(RGB)n -- 3n bytes: packed (24-bit) RGB values for the thumbnail pixels, n = Xthumbnail * Ythumbnail

Define Quantization table marker (FFDB)

the first two bytes, the length, after the marker indicate the number of bytes, including the two length bytes, that this header contains

until the length is exhausted (loads two quantization tables for baseline JPEG)

the precision and the quantization table index -- one byte: precision is specified by the higher four bits and index is specified by the lower four bits

precision in this case is either 0 or 1 and indicates the precision of the quantized values; 8-bit (baseline) for 0 and? up to 16-bit for 1

the quantization values -- 64 bytes

the quantization tables are stored in zigzag format

Define Huffman table marker (FFC4)

the first two bytes, the length, after the marker indicate the number of bytes, including the two length bytes, that this header contains

until length is exhausted (usually four Huffman tables)

index -- one byte: if >15 (i.e. 0x10 or more) then an AC table, otherwise a DC table

bits -- 16 bytes

Huffman values -- # of bytes = the sum of the previous 16 bytes

Start of frame marker (FFC0)

the first two bytes, the length, after the marker indicate the number of bytes, including the two length bytes, that this header contains

P -- one byte: sample precision in bits (usually 8, for baseline JPEG)

Y -- two bytes

X -- two bytes

Nf -- one byte: the number of components in the image

3 for color baseline JPEG images

1 for grayscale baseline JPEG images

Nf times:

Component ID -- one byte

H and V sampling factors -- one byte: H is first four bits and V is second four bits

Quantization table number-- one byte

The H and V sampling factors dictate the final size of the component they are associated with. For instance, the color space defaults to YCbCr and the H and V sampling factors for each component, Y, Cb, and Cr, default to 2, 1, and 1, respectively (2 for both H and V of the Y component, etc.) in the Jpeg-6a library by the Independent Jpeg Group. While this does mean that the Y component will be twice the size of the other two components--giving it a higher resolution, the lower resolution components are quartered in size during compression in order to achieve this difference. Thus, the Cb and Cr components must be quadrupled in size during decompression.

Start of Scan marker (FFDA)

the first two bytes, the length, after the marker indicate the number of bytes, including the two length bytes, that this header contains

Number of components, n -- one byte: the number of components in this scan

n times:

Component ID -- one byte

DC and AC table numbers -- one byte: DC # is first four bits and AC # is last four bits

Ss -- one byte

Se -- one byte

Ah and Al -- one byte

Comment marker (FFFE)

the first two bytes, the length, after the marker indicate the number of bytes, including the two length bytes, that this header contains

whatever the user wants

End of Image (EOI) marker (FFD9)

the very last marker

JPEG文件由八個部分組成,每個部分的標(biāo)記字節(jié)為兩個,首字節(jié)固定為:0xFF,當(dāng)然,準(zhǔn)許在其前面再填充多個0xFF,以最后一個為準(zhǔn)。下面為各部分的名稱和第二個標(biāo)記字節(jié)的數(shù)值,用ultraedit的16進(jìn)制搜索功能可找到各部分的起始位置,在嵌入式系統(tǒng)中可用類似的數(shù)值匹配法定位。

一、圖像開始SOI(Start of Image)標(biāo)記,數(shù)值0xD8

二、APP0標(biāo)記(Marker),數(shù)值0xE0

1、APP0長度(length)??????????????????????????? 2byte

2、標(biāo)識符(identifier)???????????????????? 5byte

3、版本號(version)??????????????????????? 2byte

4、X和Y的密度單位(units=0:無單位;units=1:點(diǎn)數(shù)/英寸;units=2:點(diǎn)數(shù)/厘米)??????????????????????? 1byte

5、X方向像素密度(X density)????????????????????? 2byte

6、Y方向像素密度(Y density)?????????????????????? 2byte

7、縮略圖水平像素數(shù)目(thumbnail horizontal pixels)????????????? ???????? 1byte

8、縮略圖垂直像素數(shù)目(thumbnail vertical pixels)??????????????????????????? 1byte

9、縮略圖RGB位圖(thumbnail RGB bitmap),由前面的數(shù)值決定,取值3n,n為縮略圖總像素?? 3n byte

三、APPn標(biāo)記(Markers),其中n=1~15,數(shù)值對應(yīng)0xE1~0xEF

1、APPn長度(length)

2、應(yīng)用細(xì)節(jié)信息(application specific information)

四、一個或者多個量化表DQT(difine quantization table),數(shù)值0xDB

1、量化表長度(quantization table length)

2、量化表數(shù)目(quantization table number)

3、量化表(quantization table)

五、幀圖像開始SOF0(Start of Frame),數(shù)值0xC0

1、幀開始長度(start of frame length)

2、精度(precision),每個顏色分量每個像素的位數(shù)(bits per pixel per color component)

3、圖像高度(image height)

4、圖像寬度(image width)

5、顏色分量數(shù)(number of color components)

6、對每個顏色分量(for each component)

包括:ID、垂直方向的樣本因子(vertical sample factor)、水平方向的樣本因子(horizontal sample factor) 、量化表號(quantization table#)

六、一個或者多個霍夫曼表DHT(Difine Huffman Table),數(shù)值0xC4

1、霍夫曼表的長度(Huffman table length)

2、類型、AC或者DC(Type, AC or DC)

3、索引(Index)

4、位表(bits table)

5、值表(value table)

七、掃描開始SOS(Start of Scan),數(shù)值0xDA

1、掃描開始長度(start of scan length)

2、顏色分量數(shù)(number of color components)

3、每個顏色分量

包括:ID、交流系數(shù)表號(AC table #)、直流系數(shù)表號(DC table #)

4、壓縮圖像數(shù)據(jù)(compressed image data)

八、圖像結(jié)束EOI(End of Image),數(shù)值0xD9

免責(zé)聲明:本文僅代表文章作者的個人觀點(diǎn),與本站無關(guān)。其原創(chuàng)性、真實(shí)性以及文中陳述文字和內(nèi)容未經(jīng)本站證實(shí),對本文以及其中全部或者部分內(nèi)容文字的真實(shí)性、完整性和原創(chuàng)性本站不作任何保證或承諾,請讀者僅作參考,并自行核實(shí)相關(guān)內(nèi)容。

http://www.pinlue.com/style/images/nopic.gif

總結(jié)

以上是生活随笔為你收集整理的major头文件_JPEG头文件结构及组成的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 日韩v在线 | 亚洲视频国产视频 | 亚洲在线精品视频 | 亚洲色图久久 | 免费成人高清 | 哪里有毛片看 | 久久电影一区二区 | 天天人人精品 | 成人免费黄| 天天色小说| 亚洲精品女人久久久 | 国产欧美一区二区三区免费看 | xxxx国产片| 成人av网站在线 | 亚洲国产精品无码久久 | 成人黄色免费网 | 美女扒开让男人桶爽 | 粉嫩小箩莉奶水四溅在线观看 | 亚洲区在线| 久久亚洲aⅴ无码精品 | 温柔少妇的高潮呻吟 | 少妇一级淫免费播放 | 国产xx在线观看 | 成人乱人乱一区二区三区一级视频 | 欧美与黑人午夜性猛交久久久 | 国产亚洲欧美一区二区三区 | 少妇精品无码一区二区 | 熊猫av| 天堂视频网| 人妻激情偷乱频一区二区三区 | 成人做爰69片免费观看 | 欧美大片在线 | 丁香婷婷综合激情 | 大尺度做爰呻吟舌吻网站 | 国产成人专区 | 九九热中文字幕 | 成人深夜在线观看 | 亚洲欧美日韩在线看 | 永久视频在线观看 | 超碰95在线 | 免费av网址在线观看 | 日韩一区二区在线视频 | 成人福利片 | 欧美乱妇日本无乱码特黄大片 | 温柔女教师在线观看 | 51成人做爰www免费看网站 | 国产精品午夜一区二区 | 嫩模被强到高潮呻吟不断 | 色妞综合 | 亚洲九区 | 精品无码人妻少妇久久久久久 | 成人av在线播放网站 | av桃色| 日本午夜视频在线观看 | 综合久久2o19 | 日韩中文免费 | 国产高清精品一区 | 麻豆观看| 免费观看黄色一级视频 | 久久精品视频网站 | 亚洲免费视频播放 | 天天av综合 | 亚洲av无码一区二区三区在线 | 欧美日韩亚洲精品内裤 | 特大黑人巨交吊性xxxx视频 | 老头老太吃奶xb视频 | 日韩欧美高清片 | 欧美一级性生活视频 | 国产三区在线视频 | av黄色国产| 九九色播| 久久无码性爱视频 | 麻豆视频免费在线 | 国产欧美日韩另类 | 亚洲精品污一区二区三区 | 抖音视频在线观看 | 粉色午夜视频 | 日本在线视频免费 | 成人动漫av在线 | 四虎影视最新网址 | 婷婷婷色 | 色撸撸av| 精品综合久久久久 | 91爱爱网站 | 国产精品免费视频一区二区三区 | 成人看片泡妞 | 国产精品日本一区二区在线播放 | a天堂中文在线观看 | 亚洲最新中文字幕 | 亚洲精品成a人在线观看 | 一个色的综合 | 婷婷狠狠操 | 国产精品免费av | 一区二区久久精品66国产精品 | 国产毛片毛片毛片毛片毛片 | 日日摸日日碰夜夜爽无码 | 日韩欧美三级在线 | 内射合集对白在线 | 正在播放亚洲 |