예제 #1
0
        public async Task <byte[]> CacheImageAndResize(string urlPicture, byte[] bits)
        {
            if (_dictCacheImages.ContainsKey(urlPicture))
            {
                _dictCacheImages.Remove(urlPicture);
            }
            string filePath = await _platformService.CacheImage(bits);

            if (filePath != null)
            {
                _dictCacheImages.Add(urlPicture, filePath);
            }
            return(await _platformService.ReadFileAndResize(filePath, IMAGESIZE_THUMB));
        }