A small, dependency-light viewer for classic Commodore-Amiga IFF ILBM (Interleaved Bitmap) images, rendered in a native Wayland window. Built for a tiling setup (Hyprland): the image auto-scales to the window while preserving aspect ratio, and closing the window quits the program.
It fully honours the CAMG viewport mode so images display with the correct geometry and palette, including HAM, Extra-Half-Brite, hi-res and interlace.
- Parses IFF ILBM:
BMHD,CMAP,CAMG,BODY(unknown chunks are skipped). ByteRun1(PackBits) compression and uncompressed BODY.- Display modes:
- Plain indexed, 1–8 bitplanes
- EHB (Extra-Half-Brite), 6 planes / 64 colours
- HAM6 (OCS, 4096 colours) and HAM8 (AGA)
- 24-bit / 32-bit deep (direct RGB) ILBM
- Palette handling: OCS 12-bit palettes (4-bit-per-gun stored in the high nibble) are expanded to full range; CAMG garbage bits are sanitised and cross-validated against the plane count.
- Authentic Amiga pixel aspect: uses the
BMHDaspect fields when present, otherwise derives from CAMG hi-res/interlace. The image is fitted into the window with correct proportions and black letterbox/pillarbox bars. - Nearest-neighbour scaling (crisp pixels), re-scaled live on window resize.
- Quit by closing the window, or pressing Esc / q.
libwayland-clientwayland-scanner+wayland-protocols(forxdg-shell, used at build time)gcc,make,pkg-config
No SDL, GTK, cairo, EGL or xkbcommon. Rendering is pure software via wl_shm.
makeThis generates the xdg-shell client glue with wayland-scanner and produces
./ilbmview.
./ilbmview picture.ilbmThe window can be tiled or floated like any other Wayland toplevel (app-id
ilbmview). Resize it and the image rescales to fit.
make install installs the binary to $(PREFIX)/bin (default ~/.local) and a
.desktop handler that declares the image/x-ilbm MIME type, then refreshes the
desktop database:
make install # user install to ~/.local
sudo make install PREFIX=/usr/local # or a system-wide installMake it the default viewer for ILBM files (*.ilbm, *.lbm, *.iff):
xdg-mime default ilbmview.desktop image/x-ilbmThat is all Nautilus (and anything GIO-based, including gio open) needs:
GIO recognises the image/x-ilbm type from the file extension and will launch
ilbmview on double-click.
xdg-open note (non-GNOME/KDE sessions such as Hyprland/Sway): the generic
xdg-mime detector falls back to file --mime-type, which reports ILBM files as
application/octet-stream, so xdg-open won't route them by itself. Install a
glob-aware detector to fix it:
sudo pacman -S perl-file-mimeinfo # provides `mimetype`, used by xdg-mimeAfter that, xdg-mime query filetype picture.ilbm returns image/x-ilbm and
xdg-open picture.ilbm opens ilbmview. (gio open picture.ilbm works without
this.)
To undo everything: make uninstall, and remove the image/x-ilbm line from
~/.config/mimeapps.list.
make install also sets up two optional Nautilus integrations:
- Thumbnails. A
.thumbnailermapsimage/x-ilbmtoilbm-thumbnail, a tiny headless tool (built alongsideilbmview, no Wayland/libpng needed — it uses the same decoder and a self-contained PNG writer). Nautilus then shows correctly-decoded ILBM previews — HAM/EHB colours and Amiga pixel aspect and all. - Metadata columns. A nautilus-python
extension adds Dimensions, Amiga Mode (e.g.
HAM6 · interlaced), Bit-planes and Compression columns. Enable them per-folder via list view → the column header context menu, or globally in Nautilus Preferences. It reads only the IFF header, so it is cheap.
After installing, restart Nautilus so it loads them:
nautilus -q # the running instance respawns on next useilbm-thumbnail is also usable on its own: ilbm-thumbnail in.ilbm out.png 512.
- Dynamic per-scanline palettes (
SHAM/CTBL/PCHGcopper-list colour changes) and colour cycling (CRNG/CCRT). - Transparency / masking compositing — the mask plane is parsed and skipped; images render as opaque single frames.
src/iff.{c,h} IFF chunk walker + ILBM field extraction
src/ilbm.{c,h} bitplane decode, all CAMG modes, aspect calculation
src/wl.{c,h} Wayland wl_shm/xdg-shell client, scaler, input
src/main.c CLI glue
Copyright (C) 2026 Thomas Cherryhomes.
ilbmview is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License, version 3 or later (GPL-3.0-or-later), as published by the Free Software Foundation. See LICENSE for the full text. It comes with NO WARRANTY, to the extent permitted by law.