jpeg渐进式编码_如何分辨渐进式JPEG

本文介绍了如何使用ImageMagick库来检测JPEG图片是否采用渐进式编码,并提到了在新版本中更简便的方法。此外,还提及了jpegtran和MozJPEG工具在基线和渐进式JPEG之间的转换应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

jpeg渐进式编码

jpeg渐进式编码

Using ImageMagick ($ brew install imagemagick) certainly helps. E.g.

使用ImageMagick( $ brew install imagemagick )当然可以。 例如

$ identify -verbose baseline.jpg | grep Interlace
  Interlace: None
$ identify -verbose progressive.jpg | grep Interlace
  Interlace: JPEG

As you can see baseline.jpg is baseline, i.e. not progressive, while progressive.jpg is indeed progressive.

如您所见, baseline.jpg是基线,即不是渐进式的,而progressive.jpg的确是渐进式的。

新颖性 (Newness)

Apparently in newer IM (v7.0.3.8+) you should be able to tell without resorting to grep, like so

显然,在较新的IM(v7.0.3.8 +)中,您应该无需诉诸grep就可以知道,就像这样

$ identify -format "%[interlace]" progressive.jpg

See https://www.imagemagick.org/script/escape.php

参见https://www.imagemagick.org/script/escape.php

快速提醒 (A quick reminder)

You can use jpegtran (or MozJPEG) to convert to and fro the baseline/progressive.

您可以使用jpegtran(或MozJPEG )在基线/渐进线之间来回转换。

In MozJPEG the -progressive option is default, so you need -baseline apparently (did not work for me with the brew install of MozJPEG). In jpegtran baseline is default, so you need to say -progressive, as in

在MozJPEG的-progressive选项是默认的,所以你需要-baseline显然(对我来说与BREW没有工作安装MozJPEG的)。 在jpegtran中,基线是默认设置,因此您需要说-progressive ,如

$ jpegtran -progressive in.jpg > out.jpg
        
        

Tell your friends about this post on Facebook and Twitter

FacebookTwitter上告诉您的朋友有关此帖子的信息

翻译自: https://www.phpied.com/how-to-tell-a-progressive-jpeg/

jpeg渐进式编码

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值