位图图像保存在C#中的灰度图像 [英] save bitmap image as grayscale image in C#

查看:133
本文介绍了位图图像保存在C#中的灰度图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的位图代码

Bitmap b = new Bitmap(columns, rows, PixelFormat.Format24bppRgb);
BitmapData bmd = b.LockBits(new Rectangle(0, 0, columns, rows), ImageLockMode.ReadWrite, b.PixelFormat); 



我怎么可以这样保存为灰度图像?

How can i save this as a grayscale image ?

好IAM特别感兴趣的储蓄部分。我该如何将它保存为一个文件?

Well iam specifically interested in the saving part. How do i save it as a file ?

推荐答案

有在谷歌许多环节

https://web.archive.org/web/20110219113117/http://www.switchonthecode.com/tutorials/ CSHARP教程 - 转换-A-彩色图像到灰度(WebArchive断开的链接)

https://web.archive.org/web/20110219113117/http://www.switchonthecode.com/tutorials/csharp-tutorial-convert-a-color-image-to-grayscale (WebArchive for broken link)

的https:/ /web.archive.org/web/20120707003826/http://www.dreamincode.net/code/snippet2570.htm (WebArchive断开的链接)

https://web.archive.org/web/20120707003826/http://www.dreamincode.net/code/snippet2570.htm (WebArchive for broken link)

这篇关于位图图像保存在C#中的灰度图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆