bug fix. support converting image to map.