A small command-line tool for converting between PNG images and Quake's 8-bit
graphics formats: loose picture .lmp files and the gfx.wad (WAD2) archive.
It is a single Python script with no dependencies beyond the standard library.
- Python 3
python3 lumpy.py pic image.png out.lmp # one PNG -> picture .lmp
python3 lumpy.py wad pics/ gfx.wad # every PNG in a folder -> wad
python3 lumpy.py wad conchars.png gfx.wad # or a single PNG
python3 lumpy.py extract gfx.wad outdir/ # .wad or .lmp -> PNGsConverts one PNG into a Quake picture lump (width/height header followed by
palette indices). Use it for loose menu art, conback.lmp, and similar files
under gfx/.
Builds or updates a WAD2 file from a folder of PNGs, or from a single PNG. Each PNG becomes one lump named after the file (lowercased, at most 15 characters).
If the wad already exists, lumpy updates it in place: a PNG replaces the lump with the same name, or is added as a new lump, and every other lump is kept unchanged. The new wad is written to a temporary file first, so a failed run leaves the original intact.
lumpy warns if the result has no conchars lump, because the engine will not
start without it.
Turns a .wad or .lmp back into palette PNGs.
- From a wad, every picture lump and
concharsis extracted. Compressed lumps and lumps of other types are skipped. palette.lmpis extracted as a 16x16 image, one pixel per colour.colormap.lmpis extracted as a 256x64 image, one row per light level.- Any other
.lmpis treated as a picture.
By default lumpy uses palette.lmp next to the script, which is id's original
Quake palette. To use a different one, pass --palette before the command:
python3 lumpy.py --palette mymod/gfx/palette.lmp wad pics/ gfx.wadQuake pictures store one palette index per pixel, so every PNG colour is matched to the nearest palette colour (by RGB distance). Exact matches are used as is; lumpy reports how many pixels in each image needed approximating.
- Pixels with alpha below 128 become transparent (index 255).
- Opaque pixels never use index 255.
conchars.png is special:
- It must be exactly 128x128 (16x16 characters of 8x8 pixels).
- It is stored without a size header, and only inside
gfx.wad(thepiccommand refuses it). - The engine treats both index 0 (black) and index 255 as transparent in the font, so opaque black pixels are drawn with the nearest non-black colour. When extracted, both indices come out transparent.
PNGs must be 8 bits per channel (greyscale, RGB, or with alpha) or a palette image (1, 2, 4 or 8 bit), and must not be interlaced. This covers what image editors normally export. 16-bit or interlaced images are rejected with a message asking you to re-save them.
| File | Purpose |
|---|---|
lumpy.py |
The tool. |
palette.lmp |
id's original Quake palette, used by default. |
palette.png |
The same palette as an image, for reference in editors. |
GNU General Public License, version 2 or (at your option) any later version.
Copyright (C) 2026 Llortus. See COPYING.txt for the full license text.