Digital Retro Photography

Posted on .

This week I encountered a post by Matti Vuori on the fediverse, and its 320 by 200 pixel photo with 16 colours intrigued me. I went for a walk with our dog and took a couple of boring snaps to try it out for myself.

I first tried the "Posterize" and "Dither" filters in GIMP, and created pretty good images. Being a programmer, I of course wanted to automate it, and using ImageMagick and the WebP encoder, ended up with this script:

#!/usr/bin/env zsh

set -euxo pipefail



magick "${INPUT}" -auto-orient -resize ${SMOL_SIZE}x${SMOL_SIZE} -colors "${COLOURS}" png:- | cwebp -q 100 -m 6 -lossless -progress -o "${OUTPUT_SMOL}" -- -
magick "${INPUT}" -auto-orient -resize ${SMOL_SIZE}x${SMOL_SIZE} -colors "${COLOURS}" -filter point -resize ${BIG_SIZE}x${BIG_SIZE} png:- | cwebp -q 100 -m 6 -lossless -progress -o "${OUTPUT_BIG}" -- -

It creates two files, one small for places where you can control the resize algorithm so that the photo, when blown up to normal size, stays pixelated. This lets you save a lot on the file size. The second file is a big version for places where you can only resize downwards safely. The file size of the big one is still very small when compared to a regular photo.

Here's two shots, and the commands that created them:

An abandoned, rusty railway bridge.
retroify IMG_20240426_172624.jpg 8

This first image works surprisingly well with just 8 colours. It does have a darker, more broody atmosphere than the original, though. Looks quite like an old adventure game.

A trail next to the railway. A dog looks at the photographer. The dog is connected with a leash that the photographer holds.
retroify IMG_20240426_173634.jpg 64

This one needed a lot more colours than the previous one. It's a trial and error thing to find the perfect amount. I created a dithered version of this in GIMP with less colours and it also worked well, so I might do that if this quick script doesn't give a satisfactory result.

I wonder, is there a term for this? I settled on "digital retro photography", but if there's already a term out there, I'd like to use it to categorise this correctly.