- 浏览: 389873 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (309)
- xaml C# wpf (0)
- scala java inner clas (1)
- Tools UML Eclipse UML2 (1)
- Timer .NET Framework (1)
- perl (6)
- python function paramter (1)
- Python Docstring (1)
- Python how to compare types (1)
- Python (8)
- java (5)
- C# (76)
- C# WPF (0)
- p4 (0)
- WPF (46)
- .net (6)
- xaml (1)
- javascript (40)
- windows (10)
- scala (4)
- winform (1)
- c++ (48)
- tools (12)
- cmd (1)
- os (0)
- CI (0)
- shell (0)
- C (2)
- haskell (49)
- functional (1)
- tool (1)
- gnu (1)
- linux (1)
- kaskell (0)
- svn (0)
- wcf (3)
- android (1)
最新评论
In Previous discussion, we have seen the code Convert from System.Drawing.Icon to System.Media.ImageSource and vice versa
System.Windows.Drawing.Image is the base class of and System.Drawing.Bitmap, so that you can expect that the method for System.Drawing.Bitmap also applies for the System.Drawing.Image..
NOTE: the System.Drawing.Icon has no relationship with System.Drawing.Bitmap or System.Drawing.Image, there exist some conversion to Icon and vice versa, but don't expect the same approach can work with System.Drawing.Icon smoothly.
This introduce yet another way to convert from System.Drawing.Image to System.Windows.Media.ImageSource.
public static System.Windows.Media.ImageSource ConvertDrawingImage2MediaImageSource(System.Drawing.Image image) { using (var ms = new MemoryStream()) { var bitmap = new System.Windows.Media.Imaging.BitmapImage(); bitmap.BeginInit(); image.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp); ms.Seek(0, System.IO.SeekOrigin.Begin); bitmap.StreamSource = ms; bitmap.EndInit(); return bitmap; } }
发表评论
-
wpf - example to enhance ComboBox for AutoComplete
2014-09-19 15:56 1941first let’s see an example ... -
Investigate and troubleshoot possible memory leak issue of .NET application
2014-07-31 10:42 0Hi All, I would like to sh ... -
C# – CoerceValueCallback合并、替换元数据值
2013-08-05 21:59 1895Topic: C# – CoerceValueCallbac ... -
WPF – Virtualization – VirutalizationStackPanel and ItemsPanelTemplate
2013-08-05 21:55 1361Topic: WPF – Virtualization – ... -
wpf – ListView交替背景色
2013-07-02 20:56 6495Wpf – Alternate background col ... -
C# - 简单介绍TaskScheduler
2013-06-29 17:18 11941标题: C# - 简单介绍TaskSchedulerTit ... -
c# - Get enum from enum attribute
2013-06-27 21:32 1202DescriptionAttribute gives the ... -
C# - PInvoke, gotchas on the RegisterClassEx and the CreateWindowEx
2013-06-24 13:49 2537I get an exception message li ... -
c# - Use PInvoke to create simple win32 Application
2013-06-24 11:59 10889In this post, .net platform h ... -
c# - Linq's Select method as the Map function
2013-06-19 18:47 1247If you comes from a functiona ... -
c# - Tips of Linq expression Any to determine if a collection is Empty
2013-06-19 18:29 896When you are @ the linq expres ... -
myth buster - typeof accepting array of types not acceptable
2013-06-19 17:17 783I have seen from some book whe ... -
windows - trying to create WIN32 application with PInvoke
2013-06-19 14:34 0While it is stupid to do such ... -
wpf - BehaviorBase and one use examples
2013-06-18 18:41 1280Behavior is something that we ... -
WPF - Setting foreground color of Entire window
2013-06-13 16:00 1880You might as well as I would s ... -
WPF - Enhanced TabControl - TabControlEx aka Prerendering TabControl
2013-06-13 13:12 5294As an opening word, let's che ... -
wpf - ControlTemplate and AddLogicChild/RemoveLogicalChild
2013-06-10 15:42 1148Recently I was trying to debug ... -
c# - P/Invoke, DllImport, Marshal Structures and Type conversions
2013-06-05 15:25 1663P/Invoke as in the following q ... -
c# - A study on the NativeWindow - encapsulate window handle and procedure
2013-06-05 14:40 6045NativeWindow gives you a way t ... -
WCF - Notify server when client connects
2013-06-03 18:19 1183It is sometimes very importan ...
相关推荐
System.Drawing.Image.FromStream 出现参数无效的解决方法
C#System.Drawing.dll,导入unityPlugins文件下,system.drawing.dll文件下载,解决找不到system.drawing.dll的问题
unity 可以使用的System.Drawing.dll,读取图片和生成图片,亲测。
C#System.Drawing.dll,导入unityPlugins文件下,使用
C# 解析psd文件内容, 可解析psd图层,导出内部图片等
C#的System.Drawing.dll 可在Unity中使用的版本
C#System.Drawing.Color的颜色对照表 有图有说明 转载自 http://www.cnblogs.com/xpvincent/archive/2012/12/17/2821665.html
System.Windows.Forms.TreeListView.dll
打开网页C#源代码程序System.Diagnostics.Process.Start
libemgucv-windows-x86-2.3.0.1416.exe c#下的opencv~~~~~~~~~~~~~~~~~``````
将System.Drawing.dll C#类库放到unity项目中plugins目录下,就可以直接用了,移动端可能也需要gdi32.dll
c#遍历System.drawing.Color下面的所有颜色以及名称以查看,需要的朋友可以参考一下
C#连接SQLite System.data.SQLite.dll 安装文件,安装完后在安装路径找到System.data.SQLite.dll引入C#的工程中
由直线、曲线创建图形,using System.Drawing.Drawing2D;的应用例子,C#源代码 Point[] points = { new Point(40, 60), new Point(50, 70), new Point(30, 90)}; GraphicsPath path =...
System.Drawing.Html.zip 一組代碼,可以模仿流覽器繪製出HTML頁面
System.Data.SQLite.dll的1.0.112版本,从113版本开始已经不支持访问加密的SQLite数据了,这个版本可以用,.NET2.0-.NET4.5各版本都有。
silverlightToolkit4开发常缺少的文件System.Windows.Controls.Input.dll
System.Data.SQLite.dll的1.0.112版本,从113版本开始已经不支持访问加密的SQLite数据了,这是最高支持加密的版本。
在WinForm应用程序中要想使用该图表控件,需引用的DLL:System.Windows.Forms.DataVisualization.dll3.5版、在Web应用程序中要想使用该图表控件,需引用的DLL:System.Web.DataVisualization.dll、System.Web.Data...