dlemstra / Magick.NET

The .NET library for ImageMagick
Apache License 2.0
3.46k stars 416 forks source link

Magick.NET.SystemWindowsMedia causing XAML errors #1518

Open HEIC-to-JPEG-Dev opened 9 months ago

HEIC-to-JPEG-Dev commented 9 months ago

Magick.NET version

SystemWindowsMedia 7.2.1

Environment (Operating system, version and so on)

Windows 11 x64

Description

When the nuget package is added to a project (WinUI Desktop .Net 8), it causes the XAML Hot Reload to start failing when edits are made to the xaml while the app is running.

Steps to Reproduce

Create a New blank WinUI 3.0 Desktop app, upgrade it to .net 8. Run app, make any change the xaml and it works Add the SystemWindowsMedia nuget package, run the app Make a change (even just a space) to the XAML and there are now xaml errors. Remove the nuget package and it all works again

dlemstra commented 9 months ago

This sounds like a problem with XAML Hot Reload. Can you create a sample project that demonstrates this issue?

HEIC-to-JPEG-Dev commented 9 months ago

I think the problem is because the package is aimed at UWP not WinUI

dlemstra commented 9 months ago

That could be the issue. I don't think this library works with UWP.

HEIC-to-JPEG-Dev commented 9 months ago

The other way round. The library works with UWP, not WinUI - WinUI changed some of the areas like bitmaps, which the library doesn't provide (it returns UWP bitmaps) - I generally had to convert them.