How to save only one of the channels?

I would like to save only one of the color channels, for example the magenta channel of my .tiff image. How do I do that? Every time I save my image I just get a grayscale image, even though I'm able to see the magenta channel just fine.