def width_and_height_of_pixel_map(pixel_map):
   """Returns the resolution of the pixel map as two integers being width, height."""

   assert pixel_map.ndim == 3 and pixel_map.shape[2] == 2
   height, width = pixel_map.shape[:2]
   return width, height