WPF : How to handle image types that don't render via BitmapImage? #730
Replies: 4 comments
-
So far I've decided to go the second route, catch the exception - still I'd like to know if there is something WPF friendly within the library.
|
Beta Was this translation helpful? Give feedback.
-
There is a NuGet package called |
Beta Was this translation helpful? Give feedback.
-
Alright, cool. I was thinking there had to be something. So would it be considered a StreamSource? From my example above, would it become. Otherwise, I'm not sure how this works.
|
Beta Was this translation helpful? Give feedback.
-
The |
Beta Was this translation helpful? Give feedback.
-
I recently set my app to permit all file types supported by Magick.NET. The first image type that I've noticed that busted my app is the Photoshop PSD file.
In my ImageConverter class, I in brief do.
The PSD file exceptions on the
image.EndInit()
withSystem.NotSupportedException: No imaging component suitable to complete this operation was found.
The workaround I've found is to load the psd file and re-write a temp file with a .jpg extension, then display that.
Is there something more suitable than this?
Also, is there some internal Magick.NET solution that knows what isn't a BitmapImage? Or should I just catch that exception, generic as it is?
Beta Was this translation helpful? Give feedback.
All reactions