J
Johann Löwen
Hello,
how/where can i get witch image-formats are supported by the
BitmapDecoder-Class on current PC?
how/where can i get witch image-formats are supported by the
BitmapDecoder-Class on current PC?
how/where can i get witch image-formats are supported by the
BitmapDecoder-Class on current PC?
Hello,
yes i mean this class "System.Windows.Media.Imaging.BitmapDecoder". I ask
because i can open image-formats with this class witch are no presented
in
the "System.Windows.Media.Imaging" Namespace. I have install at my PC an
Canon Codec to show "CR2"-Files in the Windows explorer and with the
"Windows Live Fotogallery" and with this installation i was able to open
the
"CR2"-Files to with the "System.Windows.Media.Imaging.BitmapDecoder".
And would like to know witch image formats i can open on the pc i run my
App.
As far as I know, there's no support in WPF to do this directly. Using
the unmanaged API, you should be able to retrieve that information using
the IWICImagingFactory.CreateComponentEnumerator() method. I haven't
tried it myself, but it looks like what you want:
http://msdn.microsoft.com/en-us/library/ms736011(VS.85).aspx
I also came across this library, that seems to be a sort of .NET add-on
in which you might be able to find some classes supporting your usage:
http://code.msdn.microsoft.com/WindowsAPICodePack
Again, I haven't looked closely at it, but it seems like it might suit
your needs.
Beyond that, I'd say that to some extent one's code shouldn't really
need to know what codecs are installed. The real question is "can I open
this file?", and the best way to determine that is to try. It could fail
for a variety of reasons, including lack of an appropriate codec, and so
having your own code try to enumerate all the possible reasons it could
fail and anticipate those reasons before trying is just a waste of time
and effort on your part.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.