当前位置: 首页 > news >正文

熊撑号怎么做网站推广哪个网站企业邮箱最好

熊撑号怎么做网站推广,哪个网站企业邮箱最好,俄罗斯免费服务器,食品公司网站设计项目方法一:直接修改RGB的值 首先将BitmapData扫描线上的所有像素复制到字节数组中,然后遍历数组并对每个像素的RGB值进行修改,最后将修改后的像素值复制回BitmapData。这个过程不会影响原始的Bitmap对象,但会改变锁定的位图区域的数…

方法一:直接修改RGB的值

首先将BitmapData扫描线上的所有像素复制到字节数组中,然后遍历数组并对每个像素的RGB值进行修改,最后将修改后的像素值复制回BitmapData。这个过程不会影响原始的Bitmap对象,但会改变锁定的位图区域的数据。当完成修改后,应调用UnlockBits()方法释放锁定的位图区域。
 

System.Drawing.Bitmap bitBufferRGB = new System.Drawing.Bitmap("彩色Bitmap图像.jpg");
System.Drawing.Imaging.BitmapData data = bitBufferRGB.LockBits(
new System.Drawing.Rectangle(System.Drawing.Point.Empty, bitBufferRGB.Size),
System.Drawing.Imaging.ImageLockMode.ReadWrite, bitBufferRGB.PixelFormat);//获取内存
IntPtr pData = data.Scan0;
int bytes = data.Stride * bitBufferRGB.Height;
byte[] rgbValues = new byte[bytes];// Copy the RGB values into the array.
System.Runtime.InteropServices.Marshal.Copy(pData, rgbValues, 0, bytes);for (int y = 0; y < bitBufferRGB.Height; y++)
{for (int x = 0; x < bitBufferRGB.Width; x++){// 获取像素(x, y)在数组中的索引。int index = y * data.Stride + x * 3;// 修改RGB值。rgbValues[index] = (byte)(rgbValues[index] * 0.9); // 修改红色分量rgbValues[index + 1] = (byte)(rgbValues[index + 1] * 0.7); // 修改绿色分量rgbValues[index + 2] = (byte)(rgbValues[index + 2] * 0.9); // 修改蓝色分量}
}// Copy the modified RGB values back to the bitmap.
System.Runtime.InteropServices.Marshal.Copy(rgbValues, 0, pData, bytes);//解锁及释放资源
bitBufferRGB.UnlockBits(data);
bitBufferRGB.Dispose();

方法二:更换RGB的值位置

更换R和B的位置

System.Drawing.Bitmap bitBufferRGB = new System.Drawing.Bitmap("彩色Bitmap图像.jpg");
System.Drawing.Imaging.BitmapData data = bitBufferRGB.LockBits(
new System.Drawing.Rectangle(System.Drawing.Point.Empty, bitBufferRGB.Size),
System.Drawing.Imaging.ImageLockMode.ReadWrite, bitBufferRGB.PixelFormat);//获取内存
IntPtr pData = data.Scan0;
int bytes = data.Stride * bitBufferRGB.Height;
byte[] rgbValues = new byte[bytes];
System.Runtime.InteropServices.Marshal.Copy(pData, rgbValues, 0, bytes);for (int i = 0; i < height; i++)
{for (int ji = 0; ji < width; ji++){int index = i * width + ji;// 每个像素占用三个字节// 红色字节rgbValues[index * 3] = System.Runtime.InteropServices.Marshal.ReadByte(pData, index * 3 + 2);// 绿色字节rgbValues[index * 3 + 1] = System.Runtime.InteropServices.Marshal.ReadByte(pData, index * 3 + 1);// 蓝色字节rgbValues[index * 3 + 2] = System.Runtime.InteropServices.Marshal.ReadByte(pData, index * 3);}
}
System.Runtime.InteropServices.Marshal.Copy(rgbValues, 0, pData, bytes);//解锁及释放资源
bitBufferRGB.UnlockBits(data);
bitBufferRGB.Dispose();

 

 

 

 

 

http://www.yayakq.cn/news/881652/

相关文章:

  • 服饰网站建设目的网页设计什么软件好
  • 网站不同颜色安徽合肥制作网站公司
  • 绿色风格网站国际贸易网站开发
  • 化妆品网站制作需要wordpress更改路径
  • 查询网站后台地址青岛营销型网站
  • 网站怎么做语言切换seo词条
  • 文字图片制作网站app制作
  • 公司自建网站需要多少钱免费WordPress门户一号
  • 虚拟邮箱注册网站石家庄网站制作招聘
  • 旅游景点网站建设毕业设计说明电子商务网站建设实验总结
  • 关于医院网站建设的通知哈尔滨中国建设银行网站首页
  • 合肥专业做网站建设内容关于做无机化学实验的网站
  • 建设网站时间推进表不属于网站后期维护
  • 营销案例网站祥云户网站
  • 综合购物网站排名技术号的网站建设
  • 一般建设企业网站的费用中国国际贸易单一窗口登录
  • 12306网站 给手机核验怎么做win10 电脑做网站服务器吗
  • 化妆品网站建设思路怎样提高网站访问速度
  • 江门做网站哪家好上海十大国企集团
  • 怎么样做网站赚钱吗动画设计师月薪多少
  • 网站开发与管理课程网站的meta标签优化
  • 衡水网络推广 衡水网站建设wordpress 办公主题
  • 本地做的网站如何映射出去网站的建设成本的账务处理
  • 建设银行的财务网站那个网站专门做婚纱相册
  • 大连做网站优化公司网站设计的几大标准
  • 网站建设毕业设计目录提高工作效率总结心得
  • 关于网站建设好处文章网站目录结构构建的原则是以
  • 网站横幅怎么做地产公司网站建设方案
  • 一起做网店网站特点wordpress 主题目录注册
  • 螺蛳粉营销策划方案网络排名优化软件