Guest User

Untitled

a guest
Jun 19th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. BitmapSource img = BitmapFrame.Create(uri);
  2.  
  3. BitmapSource img = BitmapFrame.Create(uri,BitmapCreateOptions.None,BitmapCacheOption.OnLoad);
  4.  
  5. MemoryStream data = new MemoryStream(File.ReadAllBytes(file));
  6. BitmapSource bitmap = BitmapFrame.Create(data);
  7.  
  8. Stream stream = File.OpenRead(filename);
  9. Bitmap template = new Bitmap(stream); // or (Bitmap) Bitmap.FromStream(stream)
  10. stream.Close();
Add Comment
Please, Sign In to add comment