Useful stuff

Here's a few things that I've made over the years that I've found useful, and who knows, someone else might too! Hey, I might even update some of these occasionally...

cdbak (1.2.0)

I like having a tangible music CD collection, for a few reasons, but at the same time I also like not losing my music data in the event that CDs degrade. So I wrote a pair of scripts to archive and restore music CDs, preserving as much of the original CD's layout as possible. Backup files are compressed using flac for the audio session and gzip for any subsequent sessions. These can then be put on your favourite backup medium (e.g. burnt to a DVD) and later recovered in the event that the original is scratched, snapped, or eaten by microbes.

Download cdbak.

alphatools (1.4)

Many years ago I wrote pair of programs, collectively known as alphatools, that process two non-alpha-mapped images to produce one or two alpha-mapped images. The intended purpose was to take computer-generated imagery and transform it to transparent sprites that could be used in games I was making. One program, mergealpha, takes a pair of images, where one image has a black background and the other a white background, and computes a new image with valid alpha channel that accurately reflects transparency information. The other program, mergecloth, does the same but with the addition that a player colour changes in the original image pair, and at the output a second image is produced that consists of a player-colour overlay (which can be adjusted easily, e.g. with a simple multiply filter). Both are console programs, both work on png files, and both need libpng. (They haven't been tested in a while, so your mileage may vary.)

Download alphatools.