Converts a bmp into a map