/// <include file='doc\Image.uex' path='docs/doc[@for="Image.Save3"]/*' /> /// <devdoc> /// <para> /// Saves this <see cref='System.Drawing.Image'/> to the specified stream in the specified /// format. /// </para> /// </devdoc> public void Save(Stream stream, ImageFormat format) { if (format == null) throw new ArgumentNullException("format"); ImageCodecInfo codec = format.FindEncoder(); Save(stream, codec, null); }
public void Save(string filename, ImageFormat format) { if (format == null) { throw new ArgumentNullException("format"); } ImageCodecInfo encoder = format.FindEncoder(); if (encoder == null) { encoder = ImageFormat.Png.FindEncoder(); } this.Save(filename, encoder, null); }
/// <include file='doc\Image.uex' path='docs/doc[@for="Image.Save1"]/*' /> /// <devdoc> /// Saves this <see cref='System.Drawing.Image'/> to the specified file in the /// specified format. /// </devdoc> public void Save(string filename, ImageFormat format) { if (format == null) throw new ArgumentNullException("format"); ImageCodecInfo codec = format.FindEncoder(); if (codec == null) codec = ImageFormat.Png.FindEncoder(); Save(filename, codec, null); }
public void Save(Stream stream, ImageFormat format) { if (format == null) { throw new ArgumentNullException("format"); } ImageCodecInfo encoder = format.FindEncoder(); this.Save(stream, encoder, null); }