After creating palpngrs (GitHub) out of code from IronGRP, I decided to create a little utility that can convert between Palettized images and PNGs. I called it IronImage.
It can convert between PNGs and Palettized images from WarCraft I and WarCraft II. It can also convert between PNGs and the cursor format of WarCraft I and WarCraft II (which has the identical format to Palettized images, but with two extra bytes in the header — one for the x-hotspot and one for the y-hotspot).
The code is available at GitHub.
I would like to add support for PCX images, which are used in StarCraft. Image support in palpngrs is provided by image-rs, and there seems to be an experimental image-rs module, image-extras where PCX support is being considered (see discussion here). However, it does not yet seem to be in a stable state, and GIMP supports the PCX format anyway. I will probably revisit PCX support at a later time. For now, IMG and Cursor support will have to do.