rasterToBitmap function

Convert a grDevices raster object into binary bitmap data