Home » minimize bit-depth number of colors lzw compression gif png lzw algorithm deflate png image file size minimum bit depth color optimize gifs pngs color pallette dictionary based compression algorithms

Graphics: Minimize Bit-Depth – minimize colors in gif png for smaller images pngs lzw algorithm

For palette-based formats like GIF and PNG, file size is directly related to the size of the color palette, or the number of colors in the image. As the number of colors in an image crosses a power of two, the file size jumps. A 33-color image must use a six-bit palette, while a 32-color image can use a 5-bit palette. Smaller palettes mean smaller codes (representing pixel patterns), which makes for smaller files. So minimizing the number of colors in index-color images like GIFs and PNGs will minimize file size.

Read more