2

In my code, I have a System.Windows.Media.ImageSource. I'd like to get that persisted to a byte array for saving to a database. The image source is being returned by a library, so it's not available as a Stream, File, BitmapImage, or otherwise.

The library is the Telerik.Windows.Documents.UI.ThumbnailFactory.

Borislav Ivanov
  • 4,684
  • 3
  • 31
  • 55
Random
  • 1,896
  • 3
  • 21
  • 33
  • Is this for the WPF or Asp.net Ajax Controls? – Hanlet Escaño Sep 17 '13 at 22:53
  • These are the Telerik controls for WPF. – Random Sep 17 '13 at 23:20
  • possible duplicate of [http://stackoverflow.com/questions/5894170/how-to-convert-imagesource-to-byte-and-back-to-imagesource](http://stackoverflow.com/questions/5894170/how-to-convert-imagesource-to-byte-and-back-to-imagesource) – Naren Sep 18 '13 at 04:41
  • Not a duplicate. A BitmapSource is not the same as ImageSource. – Random Sep 18 '13 at 14:01
  • Have a look at the very bottom of [this](http://www.codeproject.com/Questions/465372/Csharp-WPF-XAML-Convert-ImageSource-from-to-byte-a) codeproject thread. – Will Faithfull Oct 14 '13 at 20:36

0 Answers0