Ejemplo n.º 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");
        }
Ejemplo n.º 2
0
        public void QueryCapability(IStream pIStream, out uint pdwCapability)
        {
            Log.Trace("QueryCapability called");
            var stream   = new WICReadOnlyStreamWrapper(pIStream);
            var position = stream.Position;

            try
            {
                pdwCapability = (new PanasonicRW2Decoder().IsSupported(stream))
                    ? (uint)(WICBitmapDecoderCapabilities.WICBitmapDecoderCapabilityCanDecodeThumbnail
                             | WICBitmapDecoderCapabilities.WICBitmapDecoderCapabilityCanDecodeAllImages
                             | WICBitmapDecoderCapabilities.WICBitmapDecoderCapabilityCanEnumerateMetadata
                             | WICBitmapDecoderCapabilities.WICBitmapDecoderCapabilityCanDecodeThumbnail)
                    : 0;
            }
            catch (Exception)
            {
                pdwCapability = 0;
            }
            finally
            {
                stream.Position = position;
            }
        }
Ejemplo n.º 3
0
        public void QueryCapability(IStream pIStream, out uint pdwCapability)
        {
            Log.Trace("QueryCapability called");
            var stream = new WICReadOnlyStreamWrapper(pIStream);
            var position = stream.Position;
            try
            {
                pdwCapability = (new PanasonicRW2Decoder().IsSupported(stream))
                    ? (uint)(WICBitmapDecoderCapabilities.WICBitmapDecoderCapabilityCanDecodeThumbnail
                    | WICBitmapDecoderCapabilities.WICBitmapDecoderCapabilityCanDecodeAllImages
                    | WICBitmapDecoderCapabilities.WICBitmapDecoderCapabilityCanEnumerateMetadata
                    | WICBitmapDecoderCapabilities.WICBitmapDecoderCapabilityCanDecodeThumbnail)
                    : 0;
            }
            catch (Exception)
            {
                pdwCapability = 0;
            }
            finally
            {
                stream.Position = position;

            }
        }
Ejemplo n.º 4
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");
        }