Exemplo n.º 1
0
        /// <summary>
        /// bitmap cache get ->
        /// background thread hand-off -> multiplex -> bitmap cache ->
        /// decode -> branch on separate images
        ///   -> exif resize and rotate -> exif thumbnail creation
        ///   -> local image resize and rotate -> add meta data producer
        ///   -> multiplex -> encoded cache -> (webp transcode)
        ///   -> local file fetch.
        /// </summary>
        private IProducer <CloseableReference <CloseableImage> > GetLocalImageFileFetchSequence()
        {
            lock (_gate)
            {
                if (_localImageFileFetchSequence == null)
                {
                    LocalFileFetchProducer localFileFetchProducer =
                        _producerFactory.NewLocalFileFetchProducer();

                    _localImageFileFetchSequence =
                        NewBitmapCacheGetToLocalTransformSequence(localFileFetchProducer);
                }

                return(_localImageFileFetchSequence);
            }
        }
        /// <summary>
        /// encoded cache multiplex -> encoded cache -> local file fetch.
        /// </summary>
        private IProducer <CloseableReference <IPooledByteBuffer> > GetEncodedLocalImageFileFetchSequence()
        {
            lock (_gate)
            {
                if (_encodedLocalImageFileFetchSequence == null)
                {
                    LocalFileFetchProducer localFileFetchProducer =
                        _producerFactory.NewLocalFileFetchProducer();

                    _encodedLocalImageFileFetchSequence = new RemoveImageTransformMetaDataProducer(
                        NewEncodedCacheMultiplexToTranscodeSequence(localFileFetchProducer));
                }

                return(_encodedLocalImageFileFetchSequence);
            }
        }