ARCed.Helpers.Cache.LoadBitmap C# (CSharp) Method

LoadBitmap() public static method

Loads a filename as a Image from the specified folder, or recalls a cached image, and returns it.
public static LoadBitmap ( string folder, string filename ) : Image
folder string Folder specifying where the image will be searched
filename string FullPath of the image, omitting extension
return Image
        public static Image LoadBitmap(string folder, string filename)
        {
            var path = ResourceHelper.GetFullPath(folder, filename);
            if (String.IsNullOrEmpty(path))
                return null;
            if (_cache.ContainsKey(path))
                return _cache[path];
            try
            {
                _cache[path] = Image.FromFile(path);
                return _cache[path];
            }
            catch { return null; }
        }