
On an electronics repair page, the reader needs to distinguish the outline of a connector from a nearby solder pad. A photograph can look sharp as a whole and still blur those two features together. We processed a Raspberry Pi circuit board in 3 ways to see what changed in the delivered asset.
What changed in the export
Palette quantization replaces many colors with a small representative set. A palette can preserve crisp geometric edges while introducing visible steps in areas of smooth shading. The input to each run was the same 720 × 405 RGB master, made from the credited source photograph. The table gives file bytes, so it is independent of connection speed, cache state or browser timing.
| Export | Encoded bytes | Mean channel difference (0–255) |
|---|---|---|
| 16 colors | 93,834 | 10.55 |
| 64 colors | 151,764 | 5.76 |
| 256 colors | 231,299 | 3.41 |
Read the measurements beside the image
16 colors produced 93,834 bytes. The largest variant, 256 colors, produced 231,299. That makes the smaller file 59.4% lighter in this run. On a page that serves ten different illustrations of those exact sizes once each, the difference on the wire would be 1342.4 KiB before any caching or protocol overhead.
The final column is the mean absolute RGB-channel difference from the normalized input at the corresponding output dimensions. A value of zero means the compared pixels matched exactly. The arithmetic weights all pixels and channels equally. A few unreadable letters can therefore disappear inside a respectable whole-image average.
Inspect the detail that matters
First enlarge a row of pins and compare the gaps between them. Use the size at which the article will actually be read. Then enlarge the same area to locate the cause of any difference. The labeled comparison shows the image content of the exports in table order. Its own preview compression is shared across the panels, so use the recorded file sizes rather than measuring the illustration downloaded from this page.

A publishing decision for fine PCB traces
Reserve a separate rendition for photographs if the available palette is needed by important interface colors. Check shaded areas as well as flat backgrounds. Repeat the comparison with a second source before setting a site-wide default. Record the original, the editing step and the final encoding parameters so a later change in the image pipeline can be tested against the same subject.
Sources and further reading
- Pillow’s image file-format reference
- Image resizing and sampling in Pillow
- Source photograph and license
Cover photograph: Raspberry Pi 2 Model B v1.1 top new (bg cut out) by Multicherry. CC BY-SA 4.0. Cropped and typeset for this cover. The photograph illustrates the topic. This image adaptation uses the same share-alike license.
Comparison image: Raspberry Pi 2 Model B v1.1 top new (bg cut out) by Multicherry. CC BY-SA 4.0. Resized and processed for the comparison. This image adaptation uses the same share-alike license.
