예제 #1
0
        public WicDecoder(byte[] inBuffer, WicProcessingContext ctx)
        {
            var stm = AddRef(Wic.CreateStream());

            stm.InitializeFromMemory(inBuffer, (uint)inBuffer.Length);
            init(checkDecoder(() => Wic.CreateDecoderFromStream(stm, null, WICDecodeOptions.WICDecodeMetadataCacheOnDemand)), ctx);
        }
예제 #2
0
        public WicDecoder(Stream inFile, WicProcessingContext ctx)
        {
            var stm = AddRef(Wic.CreateStream());

            stm.InitializeFromIStream(inFile.AsIStream());
            init(checkDecoder(() => Wic.CreateDecoderFromStream(stm, null, WICDecodeOptions.WICDecodeMetadataCacheOnDemand)), ctx);
        }