Make Small PNG images with GNU Imp
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:
-
Go to Image → Mode → Indexed…
-
Generate optimum palette is selected by default
-
Type a value in Maximum number of colors
-
Click Convert
-
To save, use File → Export as… and save your file with a
.png
extension to have the Imp export your image as a PNG file.

(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.

Indexed 256 colors - 16.4 Kb
At a glance, this is pretty much indistinguishable from the original except in the gradient area.

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.

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!