3

I have an image control as:

<Image Height="209" HorizontalAlignment="Left" Margin="66,74,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="200" />

in a wpf application. I imported a library that converts a video to bitmap images and I am trying to place those bitmaps in the image countrol. There is a method that returns a System.Drawing.Bitmap object and I want to display that bitmap in image1. How could I do that?

H.B.
  • 166,899
  • 29
  • 327
  • 400
Tono Nam
  • 34,064
  • 78
  • 298
  • 470

1 Answers1

2

You need to convert it to an ImageSource of some kind first. See this question.

You can use a ValueConverter to do this on the fly in the binding itself.

Community
  • 1
  • 1
H.B.
  • 166,899
  • 29
  • 327
  • 400