解析jpeg文件,SOS标记 [英] Parsing jpeg file, SOS marker

查看:186
本文介绍了解析jpeg文件,SOS标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在解析jpeg文件时遇到问题.当我按下SOS(扫描开始)标记时,只有几个字节,这意味着我听不懂.在下面的图片中,在SOS标记之后,标头长度有2个字节(图片中的Ls部分).但是图片上的其余数据是什么意思(例如Ns,Cs1等...),以及纯数据从何处开始?

I'm having problem with parsing jpeg file. When I hit SOS (start of scan) marker, there are few bytes which meaning I don't understand. In picture bellow, after SOS marker, there are 2 bytes for header length (Ls part on the picture). But what the rest of data on picture mean (for example Ns, Cs1 etc....), and where the pure data starts?

推荐答案

Cs1是组件选择索引,它返回到SOF部分(其中指定了水平和垂直采样因子)

Cs1 is a components selection index, This refers back to the SOF section (where horizontal and vertical sampling factors are specified)

Td1是当前组件(Cs1)的DC表选择器

Td1 is the DC table selector for the current component (Cs1)

Ta1是当前组件(Cs1)的AC表选择器

Ta1 is the AC table selector for the current component (Cs1)

Ss,Se和Ah,Al定义当前扫描数据的频谱选择(用于渐进式位图.在渲染的第一轮中,仅显示较低的频率,在最后一轮中,显示更详细的频率)

Ss, Se and Ah,Al define the spectral selection for the current scan data (this is used in progressive bitmaps. In the first round of rendering, only lower frequencies are shown, in the final round, more detailed frequencies are shown)

扫描数据在Al之后开始

The scan data starts after Al

总之,

SOS (2 bytes)
Ls (2 Bytes)
Ns (1 byte)
Component Specific Parameters (Ns * 2 bytes)
Ss (1 byte)
Se (1 byte)
Ah,AL (1 byte)
... scan data ...

这篇关于解析jpeg文件,SOS标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆