packBitmap function

A routine to (un)pack bitmap data