Description
With .NET 6, System.Drawing.Common
become a "Windows-only" dependency.
See this official Microsoft note about the breaking change. They it's mainly because libgdiplus
used on Linux systems is "subpar".
SVG uses System.Drawing.Common
, thus libgdiplus
, so it's having issues with my docker image based on aspnet:6.0-alpine
. Any plans to migrate to one of the recommended alternatives?
Recommended action
To use these APIs for cross-platform apps, migrate to one of the following libraries:ImageSharp
SkiaSharp
Microsoft.Maui.Graphics
--
Sidenote: the reason I got into this is because I have an alignment issue under Linux that I do not have under Windows.
The code relies on amountSvgText.Dx = new SvgUnitCollection { new(SvgUnitType.Pixel, CONSTANT - amountSvgText.Bounds.Width) };
and I believe the culprit is libgdiplus
.