Skip to content

Commit

Permalink
Implemented Image.WriteTo method for WP8
Browse files Browse the repository at this point in the history
  • Loading branch information
anders9ustafsson committed Oct 13, 2014
1 parent 680bc91 commit 236f33e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Sources/System.Drawing/_Phone/Bitmap.Phone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ internal static Bitmap Create(Stream stream)

internal void WriteTo(Stream stream, ImageFormat format)
{
// TODO Implement!!!
throw new NotImplementedException("PCL");
if (!format.Equals(ImageFormat.Jpeg)) throw new ArgumentOutOfRangeException("format", format, "Only JPEG format supported");
var wbm = (WriteableBitmap)this;
wbm.SaveJpeg(stream, _width, _height, 0, 100);
}

#endregion
Expand Down

0 comments on commit 236f33e

Please sign in to comment.