This file contains hidden or 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
var bgraBuffer = new byte[256 * 256 * 4]; | |
// whatever you need to do to populate the image buffer | |
var sbm = SoftwareBitmap.CreateCopyFromBuffer(bgraBuffer.AsBuffer(), BitmapPixelFormat.Bgra8, 256, 256, BitmapAlphaMode.Premultiplied); | |
var sbms = new SoftwareBitmapSource(); | |
var ignore_this_task_it_doesnt_matter = sbms.SetBitmapAsync(sbm); | |
// SetBitmapAsync may still be in flight but it doesn't matter | |
var image = Image(); | |
image.Source = sbms; | |
This file contains hidden or 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
Disk Utility croaks when you try to do it from the UI but this command line works... | |
Replace G3X1.dmg with whatever it should be and get the device from DU. | |
asr imagescan --source ~/Documents/G3X1.dmg | |
sudo asr restore --source ~/Documents/G3X1.dmg --target /dev/disk-GET-THIS-FROM-DISK-UTILITY --erase |
OlderNewer