libjpeg是一个完全用C语言编写的处理JPEG图像数据格式的自由函式庫。它包含一个JPEG编解码器的算法实现,以及用于处理JPEG数据的多种实用程序。
该套软件采用C语言编写,并分发为附有源代码的自由软件,采用自定义的宽松(类BSD)自由软件许可证,权利要求为。原始版本由独立JPEG工作组(IJG)维护和发布。此外,也有数个提供额外特性的分叉(Fork)。
JPEG JFIF图像在万维网上被广泛使用。它可以调整压缩量级以实现文件大小与视觉质量之间的期望与权衡。
实用程序
下列实用程序随libjpeg提供:
- cjpeg和djpeg:用于JPEG与其他流行的图像文件格式之间的转换。
- rdjpgcom和wrjpgcom:用于在JPEG文件中插入和提取文字注释。
- jpegtran:用于在不同JPEG格式之间进行无损转换的工具。
jpegtran
命令列介面 jpegtran提供了幾種功能,用於重新格式化和重新編碼DCT係數的表示,分別用於轉換實際圖像數據和丟棄JPEG文件中的輔助數據。 關於係數表示的變換包括:
- 優化JPEG文件的霍夫曼編碼層以增加壓縮。
- 漸進和順序JPEG格式之間的轉換。
- 霍夫曼和算术编码在熵編碼法層之間的轉換。
|-
|
| SmartScale
(可变块大小)
| block_size/lim_Se etc.
| Evolution of JPEG
|-
|
| 内部颜色转换
(FF F8 LSE扩展标记)
| color_transform
| JPEG 9 Lossless Coding
[http://www.infai.org/jpeg/ InfAI JPEG Development Site]
|}
时间线
ImageSize = width:640 height:100
PlotArea = width:90% height:40% left:5% bottom:20%
Period = from:1992 till:2006
TimeAxis = orientation:horizontal format:yyyy
ScaleMajor = unit:year increment:1 start:1993 # rough scale
PlotData =
color:dullyellow fontsize:S # setting standards
bar:ReleaseYear from:1992 till:1994 # version 4
bar:ReleaseYear from:1994 till:1995 color:yelloworange # version 5
bar:ReleaseYear from:1995 till:end # version 6
at:1993 shift:(-6,0) text:"4a"
at:1994 shift:(-3,0) text:"5"
at:1995 shift:(-3,0) text:"6"
at:1998 shift:(-6,0) text:"6b"
TextData =
pos:(20,80) fontsize:M text: Year of release of versions # position and text for the title
ImageSize = width:640 height:100
PlotArea = width:90% height:40% left:5% bottom:45%
Period = from:2006 till:2020
TimeAxis = orientation:horizontal format:yyyy
ScaleMajor = unit:year increment:1 start:2007 # rough scale
PlotData =
color:dullyellow fontsize:S # setting standards
bar:ReleaseYear from:2006 till:2009 # version 6
bar:ReleaseYear from:2009 till:2010 color:yelloworange # version 7
bar:ReleaseYear from:2010 till:2013 # version 8
bar:ReleaseYear from:2013 till:end color:yelloworange # version 9
at:2009 shift:(-3,0) text:"7"
at:2010 shift:(-3,0) text:"8"
at:2012 shift:(-6,0) text:"8d"
at:2013 shift:(-3,0) text:"9"
at:2016 shift:(-6,0) text:"9b"
复刻
比较著名的复刻是libjpeg-turbo,它优化了执行的速度;还有mozjpeg,它的优化目标是更小的文件大小。除了这些以外,还有一个出自國際標準化組織(ISO)的libjpeg,其目的是所有JPEG 1标准的完整实现。
libjpeg-turbo
libjpeg-turbo是libjpeg的一个复刻,它采用单指令流多数据流(SIMD)指令来加速JPEG编码和解码基础效率。许多项目现在使用libjpeg-turbo而不是libjpeg,包括流行的GNU/Linux发行版(Fedora、Debian、Mageia、OpenSUSE等)、Mozilla和Chrome。
| website =
}}
mozjpeg是由Josh Aas和其他Mozilla Research人员完成的libjpeg-turbo的一个复刻。它旨在通过减少文件大小(约10%)来加快网页的加载时间,以及在不改变图像质量的前提下提高编码效率。为达到此目的,它在编码(不对称)方面使用更多处理能力,同时保持与JPEG标准的完全兼容性,不需要在解码器侧做任何改变。它实际通过优化霍夫曼编码树完成。
除了libjpeg-turbo,mozjpeg版本也建立在jpegcrush之上,这是Loren Merritt编写的一个Perl脚本。
}}
外部链接
*
- [http://www.faqs.org/faqs/jpeg-faq/ JPEG FAQs]
- [http://jpegclub.org/ JPEGclub] – 为libjpeg提供额外特性
- [http://gnuwin32.sourceforge.net/packages/jpeg.htm libjpeg面向Windows的二进制包] (托管于SourceForge.net上的中)
- [http://libjpeg-turbo.org/ libjpeg-turbo] ,一个ABI及API兼容的libjpeg的复刻,它使用x86 SIMD指令实现参考实现的大幅加速。
*
- Josh Aas, Robert Nyman; August 2014: [https://hacks.mozilla.org/2014/08/using-mozjpeg-to-create-efficient-jpegs/ 使用mozjpeg创建高效JPEG] – mozjpeg的实用性概述
- [https://fireattack.wordpress.com/2016/02/21/jpeg/ 关于JPEG的那点事儿] ,2016/02/21
评论 (0)