I have a requirement to extract image data from an XML file and output the images as separate files.
I've handled the parsing, but I'm at a loss on how to convert to an image.
The XML looks something like this:
<Bitmap>
    <BitmapInfo BitWidth="40" BitHeight="40" ByteWidth="8" BitCount="1" ColorCount="2" Compression="true">
        <ColorTable>
            <Color>0</Color>
            <Color>16777215</Color>
        </ColorTable>
        <BitData>Af5/+/8B/h/7/wH+B/v/Af4B+/8C/gB//P8C/gAf/P8C/gAH/P8C/gAB/P8D/gAAf/3/A/4AAB/9/wP+AAAH/f8D/gAAAf3/AP7+AAB//v8A/v4AAB/+/wD+/gAAB/7/AP7+AAAD/v8A/v4AAAf+/wD+/gAAH/7/AP7+AAB//v8D/gAAAf3/A/4AAAf9/wP+AAAf/f8D/gAAf/3/Av4AAfz/Av4AB/z/Av4AH/z/Av4Af/z/Af4B+/8B/gf7/wH+H/v/Af5/s/8=</BitData>
    </BitmapInfo>
    <Area Left="4430000" Top="12690000" Right="4563333" Bottom="12823333" />
</Bitmap>
Another example:
<Bitmap>
    <BitmapInfo BitWidth="24" BitHeight="14" ByteWidth="4" BitCount="1" ColorCount="2" Compression="true">
        <ColorTable>
            <Color>0</Color>
            <Color>16777215</Color>
        </ColorTable>
        <BitData>/f8u8+c5//PnOf/z5hn/8+bZ//Pm2f/z5Mn/8+Xp//Pl6f/z4eH/8+Px/4Bj8f8AM/n8/w==</BitData>
    </BitmapInfo>
    <Area Left="1043333" Top="13360000" Right="1123333" Bottom="13406667" />
</Bitmap>
Any pointers on how to go about doing this would help.