硬汉嵌入式论坛

 找回密码
 立即注册
查看: 4611|回复: 1
收起左侧

[LibJPEG] 【LibJPEG专题系列十一】渐进式JPEG

[复制链接]

740

主题

1326

回帖

3546

积分

管理员

春暖花开

Rank: 9Rank: 9Rank: 9

积分
3546
QQ
发表于 2015-4-28 16:11:30 | 显示全部楼层 |阅读模式
                                      Section - [11] What is progressive JPEG?

A simple or "baseline" JPEG file is stored as one top-to-bottom scan of the image.  Progressive JPEG divides the file into a series of scans.  
The first scan shows the image at the equivalent of a very low quality setting, and therefore it takes very little space.  Following scans
gradually improve the quality.  Each scan adds to the data already provided, so that the total storage requirement is roughly the same
as for a baseline JPEG image of the same quality as the final scan.  (Basically, progressive JPEG is just a rearrangement of the same data
into a more complicated order.)


The advantage of progressive JPEG is that if an image is being viewed on-the-fly as it is transmitted, one can see an approximation to
the whole image very quickly, with gradual improvement of quality as one waits longer; this is much nicer than a slow top-to-bottom
display of the image.  The disadvantage is that each scan takes about the same amount of computation to display as a whole baseline
JPEG file would.  So progressive JPEG only makes sense if one has a decoder that's fast compared to the communication link. (If the
data arrives quickly, a progressive-JPEG decoder can adapt by skipping some display passes. Hence, those of you fortunate enough
to have T1 or faster net links may not see any difference between progressive and regular JPEG; but on a modem-speed link, progr-
essive JPEG is great.)


Up until recently, there weren't many applications in which progressive JPEG looked attractive, so it hasn't been widely implemented.
But with the popularity of World Wide Web browsers running over slow modem links, and with the ever-increasing horsepower of
personal computers, progressive JPEG has become a win for WWW use.  IJG's free JPEG software (see part 2, item 15) now supports
progressive JPEG, and the capability is spreading fast in WWW browsers and other programs.


Except for the ability to provide progressive display, progressive JPEG and baseline JPEG are basically identical, and they work well
on the same kinds of images.  It is possible to convert between baseline and progressive representations of an image without any quality
loss.  (But specialized software is needed to do this; conversion by decompressing and recompressing is *not* lossless, due to roundoff
errors.)


A progressive JPEG file is not readable at all by a baseline-only JPEG decoder, so existing software will have to be upgraded before
progressive JPEG can be used widely.  See item 16 in part 2 for the latest news about which programs support it.
努力打造安富莱高质量微信公众号:点击扫描图片关注
回复

使用道具 举报

740

主题

1326

回帖

3546

积分

管理员

春暖花开

Rank: 9Rank: 9Rank: 9

积分
3546
QQ
 楼主| 发表于 2015-4-28 16:15:25 | 显示全部楼层
                                         Section 11渐进式JPEG

    一个简单的或是标准型的JPEG文件是存储从上到下扫描的图像。渐进式JPEG将文件分割为一系列的扫描。
首次扫描显示的相当于质量设置非常低的图像,因而只会占据很少的空间,后续的扫描将会逐渐提高图像的质
量。每一次的扫描都会添加到已经提供的数据,所以最终的扫描会使总的存储要求大致与标准型JPEG图像有
相同的质量。(基本上,渐进式JPEG只是通过一个更复杂的顺序将相同的数据进行重组。)


    渐进式JPEG的优势在于,如果图像被即时观看,人们可以很快的看到整个图像的大致情况,随着时间延长
可以看到图像质量的提高——这比从上到下的图像显示要好的多。其不方便的地方在于,每次扫描的计算量将
与整个标准JPEG文件显示时所需的计算量相同。所以只有你的解码器比网络更快的情况下,渐进式JPEG才有
意义。(如果数据很快到达,渐进式JPEG解码器可以通过跳过一些显示步骤来适应。因此,足够幸运拥有T1
亦或者比网络更快的人可能看不出渐进式JPEG和标准型JPEG任何差别,但是如果是在调制解调器速度下,渐
进式JPEG更胜一筹。)

    直到最近,没有那么多应用使得渐进式JPEG看起来有吸引力,所以它没有被广泛实施。但是随着远远高于
调制解调器连接的万维网浏览器的流行,以及个人计算机日益增强的马力,渐进式JPEGWWW的使用上获
得了胜利。现在IJG的免费JPEG软件(见part 2, item 15)支持渐进式JPEG,而且在WWW浏览器和其他程
序中,其能力正在迅速蔓延。


    除了能提供渐进式的显示,渐进式JPEG以及标准型JPEG基本上是相同的,在同种类型的图像上效果良好。
在图像的一般显示以及渐进式显示之间有可能实现没有质量损失的转换。(但是,这需要专门的软件;由于舍
入误差,解压缩和再压缩的转换不是无损的。)


    渐进式JPEG文件根本无法通过一个只有标准型JPEG的解码器读取,所以在渐进式JPEG得到广泛应用之前,
必须升级现有的软件。渐进式JPEG适用于何种程序的最新信息详见part 2, item 16部分。
努力打造安富莱高质量微信公众号:点击扫描图片关注
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2024-5-12 14:00 , Processed in 0.150476 second(s), 25 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表