Add saveBitmapToFile function.