Google开源图片压缩算法Guetzli体验

这次Google老大哥给我们带来的是‘曲奇饼’,Guetzli是由Google研究院苏黎世办公室开发的一种新的JPEG图片压缩算法,可在图片质量不变的情况下,将文件大小将至35%,并完全兼容现有的JPEG标准。Guetzli在瑞士德语中有着曲奇的意思。

Guetzli详细介绍:Google开源新算法,可将JPEG文件缩小35%

体验:

笔者环境: macOS

打开github项目:github Guetzli

从README.md中可看到,macOS安装的方式很简单:

    1.install Homebrew
    2.brew install guetzli

如果你还没安装Hombrew是可看一下我的另一篇文章:Homebrew准备

安装好Guetzli,我们先来看一下tips:

    Note: Guetzli uses a large amount of memory. You should provide 300MB of memory per 1MPix of the input image.
    //每1MPIX要保证提供300M的内存
    Note: Guetzli uses a significant amount of CPU time. You should count on using about 1 minute of CPU per 1 MPix of input image.
    //每1MPIX要占用一分钟CPU运算时间
    Note: Guetzli assumes that input is in sRGB profile with a gamma of 2.2. Guetzli will ignore any color-profile metadata in the image.
    //这个应该是sRGB的配置,不是很懂这方面

接下来,我们就跑一个看看:

    //使用方法  
    guetzli [--quality Q] [--verbose] original.png output.jpg
    guetzli [--quality Q] [--verbose] original.jpg output.jpg

打开我们的终端控制:
cd 到图片目录
输入命令:

开始压缩:

guetzli.gif

你可能感兴趣的:(Google开源图片压缩算法Guetzli体验)