Exemplo n.º 1
0
        public BitmapSource getImage(string url, string mimeType)
        {
            BitmapSource image = null;

            lock (_cache)
            {
                if (!_cache.containsBitmap(url))
                {
                    _cache.putBitmap(url, mimeType);
                }
                image = _cache.getBitmap(url);
            }

            if (image == null)
            {
                image = LruImgCache.createFallbackBitmap();
            }

            return(image);
        }
        public CanvasBitmap getImage(string url, string mimeType)
        {
            CanvasBitmap image = null;

            lock (_cache)
            {
                if (!_cache.containsBitmap(url))
                {
                    _cache.putBitmap(url, _editor);
                }
                image = _cache.getBitmap(url);
            }

            if (image == null)
            {
                image = LruImgCache.createFallbackBitmap();
            }

            return(image);
        }
Exemplo n.º 3
0
 public ImageLoader(Editor editor, string cacheDirectory)
 {
     _editor = editor;
     _cache  = new LruImgCache(CACHE_MAX_BYTES);
 }