Calculates the image of a morphism, either for its domain or for a subset of its domain.