Hi all
How can i convert a BitmapImage loaded with UriSource to a byte[ ] array so i can save it in SQLServer. I dont find how to convert to a Stream
Thanks.
Hi all
How can i convert a BitmapImage loaded with UriSource to a byte[ ] array so i can save it in SQLServer. I dont find how to convert to a Stream
Thanks.
Convert BitmapImage to byte[]
terronmax
Squire James
Let me provide an example. If you maintained a collection of classes which held raw image data in a byte[] property and wanted to display the image data for the currently selected item in the collection, under the prescribed technique, code-behind would be required to create an new instance of a BitmapSource class each time the current item is changed, regardless of if a collection item's image has been previously viewed.
How expensive is the process to create the BitmapSource instance from the byte array, and subsequently convert the BitmapSource back to a byte[] to store an updated image in the DB
timbador
Robert.