使用 PNG 對圖片失真壓縮...

PNG 是無失真影像壓縮格式,但我們仍然可以修改 pixel (失真) 讓 PNG 壓縮率更好。今天在「PNG can be a lossy format」看到的 Mac OS X 應用程式就是這個用途。

雖然是應用程式,但作者還是有說明 algorithm 是哪些,分別是從哪裡來。其中兩個是:

文章最後,作者對 GIF 很感冒... XD

GIF has antiquated compression and it's a complete waste of bandwidth. Even lossy GIF is worse than lossless optimized PNG.

另外,JPEG/WebP 還是比較小,不過 JPEG 有很多格式,瀏覽器與作業系統的支援度還是很大的阻礙:

Whether lossy PNG gives better results than JPEG depends on the image. JPEG often gives smaller files, except when image has sharp edges (e.g. text) or any transparency (which JPEG does not support at all).

Optimized lossy PNG is still a bit larger than lossy JPEG-XR/WebP/JPEG-2K, but unlike these formats it's supported by all browsers and operating systems without any fuss or hacks.

最後發現 lossypng 是 Go 寫的,程式碼也不長,看起來頗好玩的... (也許包成 ports?)

This entry was posted in Computer, Murmuring, Network, Programming, Software, WWW and tagged , , , , , , , , , , . Bookmark the permalink.

One Response to 使用 PNG 對圖片失真壓縮...

  1. wcw5504 says:

    GIF這東西,我想現在除了動畫應用之外,應該沒什麼人在用它了?
    可惜APNG推不起來,不然這格式應該會完全消失

    至於WebP這格式,前途感覺也不是很明朗。或許等Chromium統治市場以後有機會普及 XD

Leave a Reply

Your email address will not be published. Required fields are marked *