Last active
January 29, 2016 10:40
-
-
Save rolfbjarne/2d5c19ef879387ee1b6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/iOS/GlobeView.cs b/iOS/GlobeView.cs | |
index 93f1565..08c7f91 100755 | |
--- a/iOS/GlobeView.cs | |
+++ b/iOS/GlobeView.cs | |
@@ -98,12 +98,14 @@ namespace HelloWorld.iOS | |
} | |
} | |
+ static List<CGDataProvider> providers = new List<CGDataProvider> (); | |
public static IImage LoadImage (System.IO.Stream stream) | |
{ | |
var mem = new System.IO.MemoryStream ((int)stream.Length); | |
stream.CopyTo (mem); | |
var provider = new CGDataProvider (mem.ToArray (), 0, (int) mem.Length); | |
var image = CGImage.FromPNG (provider, null, false, CGColorRenderingIntent.Default); | |
+ providers.Add (provider); | |
return new CGImageImage (image, 1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment