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); }
public WicDecoder(Stream inFile, WicProcessingContext ctx) { var stm = AddRef(Wic.CreateStream()); stm.InitializeFromIStream(inFile.AsIStream()); init(checkDecoder(() => Wic.CreateDecoderFromStream(stm, null, WICDecodeOptions.WICDecodeMetadataCacheOnDemand)), ctx); }