picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.57k stars 325 forks source link

[WPF] Photos won't load with an exception #2479

Open Serg-Norseman opened 1 year ago

Serg-Norseman commented 1 year ago

A user of my application constantly encounters errors while working with his photo archive.

Type errors: at System.Windows.Media.Imaging.BitmapFrame.Create(Stream bitmapStream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption) at Eto.Wpf.Drawing.BitmapHandler.Create(Stream stream) at Eto.Drawing.Bitmap..ctor(Stream stream) ... The bitmap property type is unexpected. (0x88982F8E)

I found the following issue, which seems to be the cause of such errors: https://github.com/dotnet/wpf/issues/7250

Considering the code in the /src/Eto.Wpf/Drawing/BitmapHandler.cs file (https://github.com/picoe/Eto/blob/390aa407cfa828992e399e8fe4a0c2244f528bb4/src/Eto.Wpf/Drawing/BitmapHandler.cs#L82), this is probably the reason (BitmapCacheOption.OnLoad).

Specifications