Click here to Skip to main content
15,888,733 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi how can convert bitmapimage to byte array in WPF?
Please help me
thanx
Posted

1 solution

Basically, save it in a memory stream and read it back as an array of bytes.

Please see http://msdn.microsoft.com/en-us/library/system.io.memorystream.aspx[^].

Before reading, don't forget to get back to the zero stream position using the method Seek.

Read with the method Read, see http://msdn.microsoft.com/en-us/library/system.io.memorystream.read.aspx[^].

—SA
 
Share this answer
 
v2
Comments
Espen Harlinn 22-Jan-12 6:49am    
5'ed :)
Sergey Alexandrovich Kryukov 22-Jan-12 12:55pm    
Thank you, Espen.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900