Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Serg-Norseman opened this issue May 18, 2023 · 0 comments
Open

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

Serg-Norseman opened this issue May 18, 2023 · 0 comments

Comments

@Serg-Norseman
Copy link
Contributor

Serg-Norseman commented May 18, 2023

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:
dotnet/wpf#7250

Considering the code in the /src/Eto.Wpf/Drawing/BitmapHandler.cs file (

Control = swmi.BitmapFrame.Create(new Uri(fileName), swmi.BitmapCreateOptions.None, swmi.BitmapCacheOption.OnLoad);
), this is probably the reason (BitmapCacheOption.OnLoad).

Specifications

  • Version: 2.7.5
  • Platform(s): WPF, NET6
  • Operating System(s): Windows 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant