ClaudiaIDE.ImageProvider.SingleImageProvider.LoadImage C# (CSharp) Method

LoadImage() private method

private LoadImage ( ) : void
return void
        private void LoadImage()
        {
            var fileUri = new Uri(_setting.BackgroundImageAbsolutePath, UriKind.RelativeOrAbsolute);
            var fileInfo = new FileInfo(_setting.BackgroundImageAbsolutePath);
            _bitmap = new BitmapImage();
            if (fileInfo.Exists)
            {
                _bitmap.BeginInit();
                _bitmap.CacheOption = BitmapCacheOption.OnLoad;
                _bitmap.UriSource = fileUri;
                _bitmap.EndInit();
                _bitmap.Freeze();
            }

            _bitmap = Utils.EnsureMaxWidthHeight(_bitmap, _setting.MaxWidth, _setting.MaxHeight);
        }