Well, all modern picture compressors have more context than a single scanline.
PNG has a pre-filter which takes input from 3 pixels from previous line and 1 previous pixel from same line. (after filtering it compresses the delta with deflate)
JPEG operates in blocks and JPEG 2000 and other wavelet compressors have naturally 2-dimensional context since the picture is filtered by both x and y axis.
IFF/ILBM is RLE-based. Only way to improve it by palette tricks would be to reduce the number of palette entries. (maybe to get rid of bitplanes)
GIF is LZW, same thing really. The encoding efficiency does not really depend on the ordering of the code words. Obviously dropping palette entries will have some effect since the initial dictionary is smaller.
|