zoukankan
html css js c++ java
半透明图像生成程序
Graphics g
=
pictureBox2.CreateGraphics();
Bitmap bitmap
=
new
Bitmap(openFileDialog1.FileName);
float
[][] matrixitems
=
{
new
float
[]
{
1
,
0
,
0
,
0
,
0
}
,
new
float
[]
{
0
,
1
,
0
,
0
,
0
}
,
new
float
[]
{
0
,
0
,
1
,
0
,
0
}
,
new
float
[]
{
0
,
0
,
0
,
0.2f
,
0
}
,
new
float
[]
{
0
,
0
,
0
,
0
,
1
}
}
;
ColorMatrix colormatrix
=
new
ColorMatrix(matrixitems);
ImageAttributes imageAtt
=
new
ImageAttributes();
imageAtt.SetColorMatrix(colormatrix,ColorMatrixFlag.Default,ColorAdjustType.Bitmap);
int
iWidth
=
bitmap.Width;
int
iHeight
=
bitmap.Height;
//
g.DrawLine(new Pen(Color.Black,25),new Point(10,35),new Point(200,35));
g.DrawImage(bitmap,
new
Rectangle(
30
,
0
,iWidth,iHeight),
0
,
0
,iWidth,iHeight,GraphicsUnit.Pixel,imageAtt);
bitmap.Dispose();
g.Dispose();
查看全文
相关阅读:
实现AB值对换的两种方法
Spring文件上传Demo
CentOS 查看系统 CPU 个数、核心数、线程数
InvocationTargetException异常
在 Excel 中设置图片
JavaScript写入文件到本地
Semaphore初探
MySQL连接服务端的几种方式
超链接导致window.location.href失效的解决办法
在 CentOS7 上安装 swftools
原文地址:https://www.cnblogs.com/lidune/p/546676.html
最新文章
MyEclipse启动和运行速度优化
【转】页面跳转Transfer与Redirect的区别你知道吗?
[备忘]Visio中连接线交叉时跨线小弯的去掉方法
【转 】实战手记:让百万级数据瞬间导入SQL Server
Dictionary 的使用
VS 使用Sql Server 数据库增删改查
C#将字符串转换为整型的三种方法的总结
【原】sql 将某列拼成一个字符串
数据结构之二分法查找、快速排序思想与实现
C#对数组去重
热门文章
git stash 用法总结和注意点
Git push remote rejected {change ### closed}
Git Your branch is ahead of 'origin/master' by X commits解决方法
git checkout .还可以恢复吗
cocoapods的安装和使用
vbox中安装mac系统
乐固加固后windows下实现给apk签名
jenkins 多选参数构建配置
git push 提交某一个commit
git 查看某个文件的修改记录
Copyright © 2011-2022 走看看