I work in VS 2010, .Net 4.0. In Windows forms app, this is ok:
Image img = Image.FromStream(imagePart.GetStream());
However, in Wpf app, the Image class is from System.Windows.Controls and that isn't valid because it hasn't got a definition for FromStream method. In Windows forms, the Image class is System.Drawing.Image.
Is there a way I can use FromStream in Wpf app?