コード例 #1
0
 /// <summary>
 /// Instantiates the <see cref="ImageDecoder"/>.
 /// </summary>
 public ImageDecoder(
     IAnimatedImageFactory animatedImageFactory,
     IPlatformDecoder platformDecoder,
     BitmapPixelFormat bitmapConfig)
 {
     _animatedImageFactory = animatedImageFactory;
     _bitmapConfig         = bitmapConfig;
     _platformDecoder      = platformDecoder;
 }
コード例 #2
0
        /// <summary>
        /// Gets the platform decoder.
        /// </summary>
        public IPlatformDecoder GetPlatformDecoder()
        {
            if (_platformDecoder == null)
            {
                _platformDecoder = BuildPlatformDecoder(
                    _config.PoolFactory,
                    _config.Experiments.IsWebpSupportEnabled);
            }

            return(_platformDecoder);
        }
コード例 #3
0
 /// <summary>
 /// Provide the implementation of the PlatformBitmapFactory
 /// for the current platform using the provided PoolFactory.
 /// </summary>
 /// <param name="poolFactory">The PoolFactory.</param>
 /// <param name="platformDecoder">The PlatformDecoder.</param>
 /// <returns>The PlatformBitmapFactory implementation.</returns>
 public static PlatformBitmapFactory BuildPlatformBitmapFactory(
     PoolFactory poolFactory,
     IPlatformDecoder platformDecoder)
 {
     return(new WinRTBitmapFactory());
 }