I don't have access to those source codes. But I did once start to write my own tools.
For op2art I am using a struct
struct Image
{
qint32 scanlineSize;
qint32 data;
qint32 height;
qint32 width;
qint16 type;
qint16 paletteNumber;
};
(Note: I am using Qt, hence the Qt types; Note: for me, an image is the smallest logical unit in op2art.prt)
You can check whether data points to a shadow image by image.type & 4. If that is the case, decode the image data as 1 bpp monochrome.
The wellXXXX.bmp files are very different. Hooman made a thread about them here (http://forum.outpost2.net/index.php?showtopic=1250)