c# - convert a bitmapImage to byte array for windows store -


i need know how convert bitmap-image byte array windows store application. here have tried not store bitmapimage

    dim file storagefile = await windows.storage.storagefile.getfilefromapplicationuriasync()     dim stream irandomaccessstream = await file.openasync(windows.storage.fileaccessmode.read)     dim decoder bitmapdecoder = await bitmapdecoder.createasync(stream)     dim pixeldata pixeldataprovider = await decoder.getpixeldataasync()     return pixeldata.detachpixeldata() 

save bitmap memorystream bitmap.save() , save memorystream.toarray(). maybe not elegant approach, works. can post working code bit later.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -