Transforms an image to a new colorspace.