private static AttemptUsingWindowsCodecs ( Stream stream, int decodeWidth, int decodeHeight ) : |
||
stream | Stream | Stream containing entire file. NOT raw pixels. |
decodeWidth | int | Width to decode to. Aspect unchanged if decodeHeight = 0. |
decodeHeight | int | Height to decode to. Aspect unchanged if decodeWidth = 0. |
return |
private static BitmapImage AttemptUsingWindowsCodecs(Stream stream, int decodeWidth, int decodeHeight)
{
BitmapImage img = null;
try
{
img = UsefulThings.WPF.Images.CreateWPFBitmap(stream, decodeWidth, decodeHeight);
}
catch (FileFormatException fileformatexception)
{
Debug.WriteLine(fileformatexception);
}
catch (NotSupportedException notsupportedexception)
{
Debug.WriteLine(notsupportedexception);
}
img.Freeze();
return img;
}
WIC_Codecs::AttemptUsingWindowsCodecs ( byte ImageFileData, int decodeWidth, int decodeHeight ) : |
|
WIC_Codecs::AttemptUsingWindowsCodecs ( string imagePath, int decodeWidth, int decodeHeight ) : |