Compression for Indexed GIF

GIF LZW compression operates on horizontal blocks of the same color. Here are two images that are identical except for a 90 degree rotation. The vertical stripe GIF image is nearly twice as large as the horizontal stripe GIF image. The PNG images are the same size.

FormatHorizontal
Stripes
Vertical
Stripes
GIFhorizontal lines
471 bytes
vertical lines
911 bytes
PNGhorizontal lines
232 bytes
vertical lines
221 bytes