Myvik_
Myvik_
CC#
Created by Myvik_ on 5/25/2023 in #help
❔ "A General Error Has Occurred in GDI+"
Everything works fine for me
8 replies
CC#
Created by Myvik_ on 5/25/2023 in #help
❔ "A General Error Has Occurred in GDI+"
why are you calling g.Dispose() inside the using
I was already tired at that time and for some reason I didn't notice it
8 replies
CC#
Created by Myvik_ on 5/25/2023 in #help
❔ "A General Error Has Occurred in GDI+"
Decision:
c++
ScreenshotImage.Source = null;

BitmapImage bitmapImage = new BitmapImage();
bitmapImage.BeginInit();
bitmapImage.CacheOption = BitmapCacheOption.OnLoad;
bitmapImage.CreateOptions = BitmapCreateOptions.IgnoreImageCache;
bitmapImage.UriSource = new Uri(imagePath);
bitmapImage.EndInit();

ScreenshotImage.Source = bitmapImage;
c++
ScreenshotImage.Source = null;

BitmapImage bitmapImage = new BitmapImage();
bitmapImage.BeginInit();
bitmapImage.CacheOption = BitmapCacheOption.OnLoad;
bitmapImage.CreateOptions = BitmapCreateOptions.IgnoreImageCache;
bitmapImage.UriSource = new Uri(imagePath);
bitmapImage.EndInit();

ScreenshotImage.Source = bitmapImage;
8 replies
CC#
Created by Myvik_ on 5/25/2023 in #help
❔ "A General Error Has Occurred in GDI+"
Decided.
8 replies