mono/MonoGame — pull request #422 by RandolphBurt (2012-04-07 18:24:30+00:00)
Title: Texture2D - Support for SaveAsPng and SaveAsJpeg

Added the methods SaveAsPng and SaveAsJpeg.
Both of these methods (and the CreateRGBImageFromBufferData method that they call) are taken from the MacOS MonoGame implementation with a very minor change to the CGImageAlphaInfo declaration to ensure the correct Alpha channel is stored and to ensure the Red and Blue are in the correct order.

NOTE: One issue is that the XNA representation of this method takes a Stream whereas this version takes a filename. Is that OK?

Also note I have not checked the return value of the err out parameter in the NSData Save method.