.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运行的更多相关文章

  1. 类库探源——System.Drawing.Bitmap

    一.System.Drawing.Bitmap Bitmap 类: 封装GDI+ 位图,此位图由图形图像及其属性的像素数据组成.Bitmap 是用于处理由像素定义的图像的对象 命名空间: System ...

  2. 将System.Drawing.Bitmap转换为Direct2D.D2DBitmap

    最近在尝试Direct2D编程,挺好玩的. 但是有时候还是会用到GDI+来生成图片,但D2D绘图需要用到自己的D2DBitmap类. 因此需要转换,查阅了下网上的资料,写了这么一个方法: using ...

  3. .net学习笔记----利用System.Drawing.Image类进行图片相关操作

    C#中对图片的操作主要是通过System.Drawing.Image等类进行. 一.将图片转换为字节流 /// <summary> /// 图片处理帮助类 /// </summary ...

  4. System.Drawing.image 与ImageSource 互转

    private BitmapSource bs(Bitmap bt) { IntPtr ip = bt.GetHbitmap(); BitmapSource bitmapSource = System ...

  5. Linux/Docker 中使用 System.Drawing.Common 踩坑小计

    前言 在项目迁移到 .net core 上面后,我们可以使用 System.Drawing.Common 组件来操作 Image,Bitmap 类型,实现生成验证码.二维码,图片操作等功能.Syste ...

  6. 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 ...

  7. 在linux 或docker中使用 system.drawing.common

    在dockerfile 中添加 FROM microsoft/dotnet:2.1-aspnetcore-runtime RUN apt-get update RUN apt-get install ...

  8. Asp.Net Core使用System.Drawing.Common部署到docker报错问题

    Asp.Net Core 2.1发布后,正式支持System.Drawing.Common绘图了,可以用来做一些图片验证码之类的功能.但是把网站部署到docker容器里运行会遇到很多问题,也是非常闹心 ...

  9. .Net Core 之 图形验证码 本文介绍.Net Core下用第三方ZKWeb.System.Drawing实现验证码功能。

    本文介绍.Net Core下用第三方ZKWeb.System.Drawing实现验证码功能. 通过测试的系统: Windows 8.1 64bit Ubuntu Server 16.04 LTS 64 ...

随机推荐

  1. Display certain line(s) from a text file in Linux.

    Purpose: Display certain line or lines from a text file, such as : Display the 1000th line from file ...

  2. 转:Redis 缓存策略

    转:http://api.crap.cn/index.do#/web/article/detail/web/ARTICLE/7754a002-6400-442d-8dc8-e76e72d948ac 目 ...

  3. androidannotations的background和UiThread配合使用參考

    简单介绍 androidannotations在开发中的代码规范思考:(MVC思考)时间太紧,先贴代码: Activity的代码: package edu.njupt.zhb.main; import ...

  4. 为DataGrid 写一个 DropDownListColumn

    Net下有一个类DataGridColumn 作为 DataGrid 控件的不同列类型的基类. 有关此类型全部成员的列表.请參阅 DataGridColumn 成员. System.Object  S ...

  5. Workspace in use or cannot be created, choose a different one.--错误解决的方法

    eclipse 使用一段时间后.有时会由于一些故障自己就莫名奇异的关闭了,再打开时有时没有问题,有时有会提示错误 Workspace Unavailable: Workspace in use or ...

  6. iOS开发——代码生成TabBar与视图切换具体解释

    我在之前多篇博客中解说了在不使用storyboard而使用nib文件的情况下.使用代码生成导航栏并进行跳转,具体能够參考<iOS开发--界面跳转与返回及视图类型具体解释><iOS纯代 ...

  7. C++ Sleep Function 使用方法 Sleep(-1)

    <span style="font-size:18px;">//==================================================== ...

  8. Server Tomcat v8.0 Server at localhost failed to start.

    怎么办? 查资料的话别人会告诉你须要删除一个东西.这是一种方法.可是你的错误并不是通过这种方法能够解决. 比方像我 <url-pattern>login</url-pattern&g ...

  9. shell中获取时间,作为文件夹格式

    近期写了一个小程序,须要用到时间.遍历作为文件夹的一部分 #!/bin/bash for i in {1..30} do date=`date +%Y/%m/%d -d " $i days ...

  10. SQL 2005批量插入数据的二种方法

    SQL 2005批量插入数据的二种方法 Posted on 2010-07-22 18:13 moss_tan_jun 阅读(2635) 评论(2) 编辑 收藏 在SQL Server 中插入一条数据 ...