02-01-2022, 11:31 PM
A GIF is color-indexed. There are 256 colors (max) in the picture, and each pixel is encoded as the index of its color in the "colormap". Since there are only 256 possible indices the pixels are encoded as an 8-bit byte. However each of these 256 colors can be any combination of 256 values of red, 256 values of green and 256 values of blue (so the 8-bit pixel value is mapped to a 24-bit color). So in the end the image may be 24BPP but is constrained to use only 256 colors among the 24M possible.
Color indexing yields grainy/pixellated pictures because there aren't enough colors available to represent smooth color transitions. There are also additional restrictions. See this for more information.
The WebP format can be used for animation, and remove most GIF restrictions (full color, lossy or lossless, partial opacity...). It is a fairly recent format which is well supported by browsers but server software doesn't always the WebP files as image types (including the one we use here, alas).
Color indexing yields grainy/pixellated pictures because there aren't enough colors available to represent smooth color transitions. There are also additional restrictions. See this for more information.
The WebP format can be used for animation, and remove most GIF restrictions (full color, lossy or lossless, partial opacity...). It is a fairly recent format which is well supported by browsers but server software doesn't always the WebP files as image types (including the one we use here, alas).