你在windows上使用图像组件没有任务问题,但部署到linux之后,将注意以下几点:
- 安装nuget包ZKWeb.System.Drawing
- 项目里还是引用System.DrawingCore,这点不用改
- 安装gdiplus插件,这个需要根据linux类型不同,有不同的方法,大叔做了一下总结
安装gdiplugs的方法
大叔总结的方法
ubuntu && debian
sudo apt-get install libgdiplus
cd /usr/lib
sudo ln -s libgdiplus.so gdiplus.dll
centos
yum whatprovides libgdiplus && yum install -y epel-release && yum install -y libgdiplus-2.10-.el7.x86_64 && yum install -y libgdiplus-devel
官方提供的方法:
Ubuntu 16.04:
apt-get install libgdiplus
cd /usr/lib
ln -s libgdiplus.so gdiplus.dll
Fedora 23:
dnf install libgdiplus
cd /usr/lib64/
ln -s libgdiplus.so. gdiplus.dll
CentOS 7:
yum install autoconf automake libtool
yum install freetype-devel fontconfig libXft-devel
yum install libjpeg-turbo-devel libpng-devel giflib-devel libtiff-devel libexif-devel
yum install glib2-devel cairo-devel
yum install git
git clone https://github.com/mono/libgdiplus
cd libgdiplus
yum -y install ftp
./autogen.sh
yum -y install gcc automake autoconf libtool make
yum -y install gcc gcc-c++
make
make install
cd /usr/lib64/
ln -s /usr/local/lib/libgdiplus.so gdiplus.dll
感谢各位阅读!