Repository navigation
Replace ImageSharp with Apache-licensed Magick.NET - #1235
Merged
Merged
Conversation
Member
Author
|
SixLabors.ImageSharp v2 (the open-source version) isn't being updated to fix latest vulnerabilities anymore. |
gao-artur
approved these changes
Nov 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace
SixLabors.ImageSharp2.1.11 in the upload sample withMagick.NET-Q8-AnyCPU15.1.0, which uses the Apache 2.0 license. This removes the vulnerable ImageSharp dependency that prevents solution restore when vulnerability warnings are treated as errors.Preserve the upload mutation's 90-degree clockwise rotation and base64-encoded JPEG response, using Magick.NET's asynchronous stream reads and writes with the existing cancellation token. Magick.NET bundles native runtime assets; it does not require a separate ImageMagick installation.
Replace the encoder-specific JPEG snapshot with tests that decode the response and verify its format, swapped dimensions, and rotated colors for both JPEG and PNG uploads. Keep the existing invalid-media-type test.
Validation:
dotnet format --no-restore --verify-no-changes --severity warnandgit diff --checkpass.