JPEG优化工具? [英] Tools for JPEG optimization?

查看:59
本文介绍了JPEG优化工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您是否知道有任何工具(最好是命令行)可自动无损地优化可以集成到我们的构建环境中的JPEG?对于PNG,我目前正在使用 PNGOUT ,它通常可以节省40%的带宽/图片大小.

Do you know of any tools (preferrably command-line) to automatically and losslessly optimize JPEGs that I could integrate into our build environment? For PNGs I'm currently using PNGOUT, and it generally saves around 40% bandwidth/image size.

至少,我想要一个可以从JPG中剥离元数据的工具-我注意到了一个奇怪的情况,我尝试从照片中制作缩略图,但不能使其小于34 kB.经过更多调查后,我发现EXIF数据仍然是图像的一部分,并且删除元数据后的缩略图为3 kB.

At the very least, I would like a tool that can strip metadata from the JPGs - I noticed a strange case where I tried to make thumbnail from a photograph, and couldn't get it smaller than 34 kB. After investigating more, I found that the EXIF data was still part of the image, and the thumbnail was 3 kB after removing the metadata.

此外,是否可以无损地进一步优化JPG? PNG优化器尝试不同的压缩策略,霍夫曼编码的随机初始化等.

And beyond that - is it possible to further optimize JPGs losslessly? The PNG optimizer tries different compression strategies, random initialization of the Huffmann encoding etc.

我知道大多数节省来自JPEG质量参数,这是一个相当主观的措施.我只是在寻找一个可以作为构建步骤运行的工具,并且可以无损地压缩图像中的几个字节.

I am aware that most savings come from the JPEG quality parameter, and that it's a rather subjective measure. I'm only looking for a tool that can be run as a build step and that losslessly squeezes a few bytes from the images.

推荐答案

我使用libjpeg进行无损操作.它包含一个命令行工具 jpegtran .使用命令行选项-copy none剥离所有元数据,并且-optimize对Huffmann压缩进行无损优化.您还可以使用-progressive将图像转换为渐进模式,但这可能会导致兼容性问题(有人对此有更多了解吗?)

I use libjpeg for lossless operations. It contains a command-line tool jpegtran that can do all you want. With the commandline option -copy none all the metadata is stripped, and -optimize does a lossless optimization of the Huffmann compression. You can also convert the images to progressive mode with -progressive, but that might cause compatibility problems (does anyone know more about that?)

这篇关于JPEG优化工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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