Skip to content

Port the ImageMagick sample to .NET 10 and Magick.NET 15 - #2337

Open
vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/116578-csharp-generate-images-using-imagemagick-net10
Open

vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/116578-csharp-generate-images-using-imagemagick-net10

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

This moves csharp-images/GenerateImagesInCSharpUsingImageMagick to net10.0 and Magick.NET-Q8-AnyCPU 15.0.0, and the test project to xunit 2.9.3, xunit.runner.visualstudio 4.0.1, Microsoft.NET.Test.Sdk 18.11.0 and coverlet.collector 10.1.0. Magick.NET 14 moved Drawables into the ImageMagick.Drawing namespace and made sizes uint, so ImageService gains the using directive and takes uint width and height, Program.cs casts image.Width and image.Height to int and disposes the image with using var, and the tests get the same casts. The test class is renamed from ImageMagickLibraryLiveTest to ImageMagickLibraryTests: none of its seven tests touches the network, so CI should run them instead of filtering them out. Built with 0 warnings and 0 errors on SDK 10.0.302, runtime 10.0.10; 7 of 7 tests pass with the CI filter. This also covers the Magick.NET security update proposed in #2237, since 15.0.0 is newer than 14.17.1.

Retarget both projects to net10.0, move Magick.NET-Q8-AnyCPU to 15.0.0 and the
test packages to xunit 2.9.3, xunit.runner.visualstudio 4.0.1,
Microsoft.NET.Test.Sdk 18.11.0 and coverlet.collector 10.1.0. Add the
ImageMagick.Drawing namespace, take uint sizes, cast Width and Height to int,
dispose the image with using var, and rename the test class off Live so CI runs it.
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

Successfully merging this pull request may close these issues.

1 participant