Пример #1
0
            static SharpDX.WIC.BitmapSource LoadBitmap(SharpDX.WIC.BitmapDecoder decoder, SharpDX.WIC.ImagingFactory2 factory)
            {
                var formatConverter = new SharpDX.WIC.FormatConverter(factory);

                formatConverter.Initialize(
                    decoder.GetFrame(0),
                    SharpDX.WIC.PixelFormat.Format32bppPRGBA,
                    SharpDX.WIC.BitmapDitherType.None,
                    null,
                    0.0,
                    SharpDX.WIC.BitmapPaletteType.Custom);

                return formatConverter;
            }