Why is the GIF format not the most compact for natural images?

Full question from our test help:

Explain, highlighting the relevant parts of the algorithm, why the GIF format is not the most compact format for representing images with natural content.

I understand that the use of GIF files will not be great for natural images, since it is limited to 256 colors, but why not provide it with a compact enough file? Anyway, you think smaller colors mean smaller file sizes.

In our notes, we are told that the LZW compression used is better than Huffman, for several reasons (including the fact that it passes only once). Will Huffman encoding / compression be the result of a smaller file?

According to Wikipedia , the PNG format provides better compression than GIF. LZW is most likely the culprit then, but why? What "parts of the algorithm" support the argument that it is "not the most compact format for representing images", especially for natural images?

+3
source share
1 answer

LZW, , , - ( , ). , .. , "" ( , ). 100 , , , "100 ".

" ", , , . - , , . LZW , .


JPEG , GIF, - . , JPG , , . (. 1.) "" , .

, ( ) , .


1: JPEG - . - "" , "" .

MP3- . , ; , , , , - , . MP3 .


2:

, PNG.

PNG , GIF, (.. DEFLATE, LZW.) . PNG.

, (- ), .

, :

132 133 134 135 136 137 138

LZW : " , ".

PNG :

132 +1 +1 +1 +1 +1 +1 +1

132, 1. LZW.

+8

All Articles