Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleaned up the file

  • Loading branch information...
commit 41e5830d6d97853a9a795b5042c4a7da55c660ac 1 parent efc9531
@Clancey authored
Showing with 6 additions and 9 deletions.
  1. +6 −9 MonoMac.Windows.Forms/Extenders/ImageExtenders.cs
View
15 MonoMac.Windows.Forms/Extenders/ImageExtenders.cs
@@ -15,22 +15,19 @@
using MonoMac.AppKit;
using System.Drawing;
using System.Drawing.Imaging;
+
namespace System.Windows.Forms
{
public static class ImageExtenders
{
- public static NSImage ToNSImage(this Image image)
- {
- using (var stream = new System.IO.MemoryStream())
- {
- image.Save(stream,ImageFormat.Png);
+ public static NSImage ToNSImage (this Image image)
+ {
+ using (var stream = new System.IO.MemoryStream()) {
+ image.Save (stream, ImageFormat.Png);
stream.Position = 0;
return NSImage.FromStream (stream);
}
- //TODO: Rewrite!
- //image.Save("tempimage");
- //return new NSImage("tempimage");
- }
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.