public void LoadImageWPF(string filePath) { filePath = System.IO.Path.Combine(TestContext.CurrentContext.TestDirectory, filePath); var uri = new Uri(filePath, UriKind.Absolute); var image = new System.Windows.Media.Imaging.BitmapImage(uri); var memory = image.ToMemoryBitmap(); memory.Save(AttachmentInfo.From("Result.png")); var writable = new System.Windows.Media.Imaging.WriteableBitmap(image); }