This is a card in Dave's Virtual Box of Cards.

Make Small PNG images with GNU Imp

Page created: 2025-06-10

Back to GNU Imp. (Aka "GIMP" - see card for explanation)

For photos, art, and other raster graphics, you’re probably better off with JPEG. But for screenshots, text, etc. where you have blocks of solid color and you want lossless compression to keep sharp edges, PNG is amazing. You may not need a full spectrum of colors for these images.

$ gimp --version
GNU Image Manipulation Program version 2.10.30

Steps to reduce colors:

screenshot of the gnu imp convert to indexed colors dialog

(The above screenshot has been reduced to 16 colors and weighs a mere 5.8Kb.)

Let’s examine a 700x439 pixel screenshot from the Inkscape vector image editor.

Original RGB colors - 48.1 Kb

This is the screen capture saved with the default "RGB" color mode. Honestly, this file size is already pretty good. But more complex images at this same size are often 150Kb and up.

screenshot as described

Indexed 256 colors - 16.4 Kb

At a glance, this is pretty much indistinguishable from the original except in the gradient area.

screenshot as described

Indexed 16 colors - 8.6 Kb

As you can see, 16 colors makes a real difference. You can especially see it in the gradient and in the color picker area at the bottom. The text is also less attractive where antialiasing has been lost.

screenshot as described

They say an image can be worth 1,000 words, and this one is pretty close to being the same file size as 1,000 words!