這次Google老大哥給我們帶來的是‘曲奇餅’,Guetzli是由Google研究院蘇黎世辦公室開發(fā)的一種新的JPEG圖片壓縮算法,可在圖片質(zhì)量不變的情況下,將文件大小將至35%,并完全兼容現(xiàn)有的JPEG標(biāo)準(zhǔn)。Guetzli在瑞士德語中有著曲奇的意思。
Guetzli詳細(xì)介紹:Google開源新算法,可將JPEG文件縮小35%
體驗:
筆者環(huán)境: macOS
打開github項目:github Guetzli
從README.md中可看到,macOS安裝的方式很簡單:
1.install Homebrew
2.brew install guetzli
如果你還沒安裝Hombrew是可看一下我的另一篇文章:Homebrew準(zhǔn)備
安裝好Guetzli,我們先來看一下tips:
Note: Guetzli uses a large amount of memory. You should provide 300MB of memory per 1MPix of the input image.
//每1MPIX要保證提供300M的內(nèi)存
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.
//這個應(yīng)該是sRGB的配置,不是很懂這方面
接下來,我們就跑一個看看:
//使用方法
guetzli [--quality Q] [--verbose] original.png output.jpg
guetzli [--quality Q] [--verbose] original.jpg output.jpg
打開我們的終端控制:
cd 到圖片目錄
輸入命令:
開始壓縮:
guetzli.gif