コード例 #1
0
        public void Initialize(IStream pIStream, WICDecodeOptions cacheOptions)
        {
            Log.Trace("Initialize called");

            lock (this)
            {
                frame = null;
                stream = new WICReadOnlyStreamWrapper(pIStream);

                ReadExif();
            }
            Log.Trace("Initialize finished");
        }
コード例 #2
0
 public void GetFrame(uint index, out IWICBitmapFrameDecode ppIBitmapFrame)
 {
     Log.Trace($"GetFrame called: {index}");
     try
     {
         if (index != 0) throw new COMException("Only 0 Frame available");
         lock (this)
         {
             if (frame == null)
                 frame = new BitmapFrameDecode(stream, exif);
         }
         ppIBitmapFrame = frame;
         Log.Trace("GetFrame finished");
     }
     catch (Exception e)
     {
         Log.Error("GetFrame failed: " + e);
         throw;
     }
 }