https://github.com/stulzq/dotnetcore-image
Solution of .NET Core GDI+(Image) on Linux/Docker
https://github.com/stulzq/dotnetcore-image
aspnetcore dotnetcore image
Last synced: about 1 year ago
JSON representation
Solution of .NET Core GDI+(Image) on Linux/Docker
- Host: GitHub
- URL: https://github.com/stulzq/dotnetcore-image
- Owner: stulzq
- License: apache-2.0
- Created: 2018-12-14T08:12:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-15T20:23:59.000Z (about 2 years ago)
- Last Synced: 2025-03-18T03:05:48.616Z (about 1 year ago)
- Topics: aspnetcore, dotnetcore, image
- Language: C#
- Homepage:
- Size: 75.2 KB
- Stars: 22
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dotnetcore-image

[](https://ci2.xcmaster.com/job/dotnetcore-image/job/master/)

Solution of .NET Core GDI+(Image) on Linux/Docker.
.NET Core does not provide an Image, Bitmap, etc. class by default.Microsoft officially provides a component that provides access to GDI+ graphics functionality - `System.Drawing.Common`.This seems to be no abnormal.I believe most people use the Windows to develop applications.If we use `System.Drawing.Common`, we have no problems developing, debugging, and running on Windows.But if we deploy the program to run on Linux, this will get a GDI+ exception, because we can no longer use GDI+ on Linux. `libgdiplus`(https://github.com/mono/libgdiplus) is C-based implementation of the GDI+ API .We can use it to solve our problem.
## Quick installation libgdiplus
### 1.In the Linux system
#### CentOS 7
````shell
sudo curl https://raw.githubusercontent.com/stulzq/awesome-dotnetcore-image/master/install/centos7.sh|sh
````
#### Ubuntu
````shell
sudo curl https://raw.githubusercontent.com/stulzq/awesome-dotnetcore-image/master/install/ubuntu.sh|sh
````
### 2.In Docker(Base on Linux Image)
This project builds an ASP.NET Core image to replace the official image(microsoft/dotnet).These images base on official image and install libgdiplus.
#### ASP.NET Core 2.2
> base on microsoft/dotnet:2.2.0-aspnetcore-runtime
````shell
FROM stulzq/dotnet:2.2.0-aspnetcore-runtime-with-image
````
[Sample](src/awesome-dotnetcore-image-hello/awesome-dotnetcore-image-hello/Dockerfile)