Tools for this job for Linux/Unix/Mac users: ppmtorgb3, rgb3toppm, and ImageMagick's convert (and a teency bit of command line saviness, i.e., for file in *; do ... ; done).
... now if only we had some stacking software as good as Registax. Maybe could run it in Wine.