让System.Drawing.Bitmap可以在linux运行
.net core的bitmap使用的是以下类库,但无法在linux运行
https://github.com/CoreCompat/CoreCompat
在linux运行需要安装runtime.linux-x64.CoreCompat.System.Drawing
https://www.nuget.org/packages/runtime.linux-x64.CoreCompat.System.Drawing
如果你的是.net core2.0,那么是使用v2类库
https://www.nuget.org/packages/CoreCompat.System.Drawing.v2
https://github.com/CoreCompat/System.Drawing
在centos运行时,始终提示无法找到gdiplus.dll的依赖项,用命令ldd libgdiplus.so,查看 libgdiplus.so的依赖文件,发现centos缺少libpcre.so.3文件,把这个文件从ubunto /lib64/x86_64-linux-gnu里面复制出来,放到centos /lib64里面,或者放在你发程序的 runtimes\linux-x64\native 文件里也可以,问题解决
让System.Drawing.Bitmap可以在linux运行的更多相关文章
- 类库探源——System.Drawing.Bitmap
一.System.Drawing.Bitmap Bitmap 类: 封装GDI+ 位图,此位图由图形图像及其属性的像素数据组成.Bitmap 是用于处理由像素定义的图像的对象 命名空间: System ...
- 将System.Drawing.Bitmap转换为Direct2D.D2DBitmap
最近在尝试Direct2D编程,挺好玩的. 但是有时候还是会用到GDI+来生成图片,但D2D绘图需要用到自己的D2DBitmap类. 因此需要转换,查阅了下网上的资料,写了这么一个方法: using ...
- .net学习笔记----利用System.Drawing.Image类进行图片相关操作
C#中对图片的操作主要是通过System.Drawing.Image等类进行. 一.将图片转换为字节流 /// <summary> /// 图片处理帮助类 /// </summary ...
- System.Drawing.image 与ImageSource 互转
private BitmapSource bs(Bitmap bt) { IntPtr ip = bt.GetHbitmap(); BitmapSource bitmapSource = System ...
- Linux/Docker 中使用 System.Drawing.Common 踩坑小计
前言 在项目迁移到 .net core 上面后,我们可以使用 System.Drawing.Common 组件来操作 Image,Bitmap 类型,实现生成验证码.二维码,图片操作等功能.Syste ...
- System.Drawing Linux Centos7 The type initializer for 'Gdip' threw an exception
System.Drawing 在linux使用时提示异常 The type initializer for 'Gdip' threw an exception 解决方案: yum install au ...
- 在linux 或docker中使用 system.drawing.common
在dockerfile 中添加 FROM microsoft/dotnet:2.1-aspnetcore-runtime RUN apt-get update RUN apt-get install ...
- Asp.Net Core使用System.Drawing.Common部署到docker报错问题
Asp.Net Core 2.1发布后,正式支持System.Drawing.Common绘图了,可以用来做一些图片验证码之类的功能.但是把网站部署到docker容器里运行会遇到很多问题,也是非常闹心 ...
- .Net Core 之 图形验证码 本文介绍.Net Core下用第三方ZKWeb.System.Drawing实现验证码功能。
本文介绍.Net Core下用第三方ZKWeb.System.Drawing实现验证码功能. 通过测试的系统: Windows 8.1 64bit Ubuntu Server 16.04 LTS 64 ...
随机推荐
- postgresql备份和恢复
备份: pg_dump -d m3vg -h localhost -p 5432 -U delta -W -f 1024.dump -F tar 恢复: pg_restore -h localhost ...
- js 实现replaceAll
须要替换到字符串里面的多个双引號,不废话,直接上代码: var filePath = '"d:/img/1.jgp"'; filePath = filePath.replace(n ...
- springmvc20170322
<?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" ...
- luogu1040 加分二叉树
题目大意 设一个n个节点的二叉树tree的中序遍历为(l,2,3,…,n),其中数字1,2,3,…,n为节点编号.每个节点都有一个分数(均为正整数),记第j个节点的分数为di,tree及它的每个子树都 ...
- Codeforces Round #142 (Div. 2)B. T-primes
B. T-primes time limit per test 2 seconds memory limit per test 256 megabytes input standard input o ...
- strok函数用法【转】
本文转载自:http://blog.csdn.net/hexiechina2010/article/details/25096763 char *strtok( char *strToken, con ...
- imagebutton 设置点击和按压效果
实现 点击 时 有按压效果 更换颜色 <ImageButton android:id="@+id/mediacontroller_Fullscreen_or_not" and ...
- 【POJ 3784】 Running Median
[题目链接] http://poj.org/problem?id=3784 [算法] 对顶堆算法 要求动态维护中位数,我们可以将1-M/2(向下取整)小的数放在大根堆中,M/2+1-M小的数放在小根堆 ...
- PCB genesis连孔加除毛刺孔(圆孔与槽孔)实现方法(二)
一.为什么 连孔加除毛刺孔 原因是 PCB板材中含有玻璃纤维, 毛刺产生位置在于2个孔相交位置,由于此处钻刀受力不均导致纤维切削不断形成毛刺 ,为了解决这个问题:在钻完2个连孔后,在相交处再钻一个孔, ...
- 常用mysql记录
多个关键词 like$joinwhere .=" and CONCAT(`JpTel`,`JpName`) Like '%$keywords%' ";