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

System.Drawing.Common updates #6939

Merged
merged 2 commits into from
Aug 16, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions includes/drawing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
>
> - Some types in the `System.Drawing` namespace rely on [GDI+](/windows/win32/gdiplus/-gdiplus-gdi-start), which is not supported in Windows services and ASP.NET Core and ASP.NET apps. These types are in the [System.Drawing.Common](https://www.nuget.org/packages/System.Drawing.Common/) NuGet package and include <xref:System.Drawing.Bitmap?displayProperty=fullName> and <xref:System.Drawing.Font?displayProperty=fullName>. However, primitive types in the namespace, such as <xref:System.Drawing.Color?displayProperty=fullName>, <xref:System.Drawing.Size?displayProperty=fullName>, <xref:System.Drawing.Point?displayProperty=fullName>, and <xref:System.Drawing.Rectangle?displayProperty=fullName>, can be used in any application.
>
> - The [System.Drawing.Common](https://www.nuget.org/packages/System.Drawing.Common/) NuGet package works on Windows, Linux, and macOS. However, there are some platform differences. On Linux and macOS, the GDI+ functionality is implemented by the [libgdiplus)](https://www.mono-project.com/docs/gui/libgdiplus/) library. This library is not installed by default in most Linux distributions and and doesn't support all the functionality of GDI+ on Windows on macOS. There are also platforms where libgdiplus is not available at all. To use types from the System.Drawing.Common package on Linux and macOS, you must install libgdiplus separately. For more information, see [Install .NET on Linux](/dotnet/core/install/linux) or [Install .NET on macOS](/dotnet/core/install/macos#libgdiplus).
> - In .NET 5 and previous versions, the [System.Drawing.Common](https://www.nuget.org/packages/System.Drawing.Common/) NuGet package works on Windows, Linux, and macOS. However, there are some platform differences. On Linux and macOS, the GDI+ functionality is implemented by the [libgdiplus)](https://www.mono-project.com/docs/gui/libgdiplus/) library. This library is not installed by default in most Linux distributions and doesn't support all the functionality of GDI+ on Windows and macOS. There are also platforms where libgdiplus is not available at all. To use types from the System.Drawing.Common package on Linux and macOS, you must install libgdiplus separately. For more information, see [Install .NET on Linux](/dotnet/core/install/linux) or [Install .NET on macOS](/dotnet/core/install/macos#libgdiplus).
>
> If you can't use `System.Drawing` with your application, recommended alternatives include [ImageSharp](https://github.com/SixLabors/ImageSharp), [SkiaSharp](https://github.com/mono/SkiaSharp), and [Windows Imaging Components](/windows/desktop/wic/-wic-about-windows-imaging-codec).
> - In .NET 6 and later versions, the [System.Drawing.Common](https://www.nuget.org/packages/System.Drawing.Common/) NuGet package is only supported on Windows operating systems.
gewarren marked this conversation as resolved.
Show resolved Hide resolved
>
> If you can't use `System.Drawing` with your application, recommended alternatives include [ImageSharp](https://github.com/SixLabors/ImageSharp), [SkiaSharp](https://github.com/mono/SkiaSharp), [Windows Imaging Components](/windows/desktop/wic/-wic-about-windows-imaging-codec), and [Microsoft.Maui.Graphics](https://github.com/dotnet/Microsoft.Maui.Graphics).