Implemented map_to_image. Please test it
on going work