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); }
public ImageLoader(Editor editor, string cacheDirectory) { _editor = editor; _cache = new LruImgCache(CACHE_MAX_BYTES); }