mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Use OnLoaded to ensure the wallpaper file is not locked
This commit is contained in:
parent
83f02f5c91
commit
60ec9b5c49
1 changed files with 2 additions and 0 deletions
|
|
@ -75,7 +75,9 @@ public static class WallpaperPathRetrieval
|
|||
// Set DecodePixelWidth and DecodePixelHeight to resize the image while preserving aspect ratio
|
||||
var bitmap = new BitmapImage();
|
||||
bitmap.BeginInit();
|
||||
bitmap.CacheOption = BitmapCacheOption.OnLoad; // Use OnLoaded to ensure the wallpaper file is not locked
|
||||
bitmap.UriSource = new Uri(wallpaperPath);
|
||||
bitmap.CreateOptions = BitmapCreateOptions.IgnoreColorProfile;
|
||||
bitmap.DecodePixelWidth = decodedPixelWidth;
|
||||
bitmap.DecodePixelHeight = decodedPixelHeight;
|
||||
bitmap.EndInit();
|
||||
|
|
|
|||
Loading…
Reference in a new issue