如何转换位图图像与32位到16bit的在C#中的色彩质量 [英] How to convert bitmap image with 32bit to 16bit color quality in C#

查看:949
本文介绍了如何转换位图图像与32位到16bit的在C#中的色彩质量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有两个imagew,第一个图像在WindowsXP中捕获
32bit的色彩质量​​和同样是在WindowsXP中捕获的16位彩色图像quality.Both已保存为位图image.But同时比较两个,我们是观察该散列值是不同的。在这里,我们正计划实施的C#代码转换的32位彩色图像质量,以16位彩色图像质量。

We have two imagew, first image is captured in WindowsXP for 32bit color quality and the same is captured in WindowsXP for 16bit color quality.Both images have been saved as bitmap image.But while comparing both, we are observing that hash values are different. Here we are planning to implement the C# code to convert the 32bit color quality image to 16bit color quality image.

有没有人有这样那样的位图图像比较问题的工作,在这方面的任何投入将提前赞赏。

Has anyone have worked on such kind of bitmap image comparison issue, Any inputs on this front would be appreciated.

非常感谢。

推荐答案

尝试使用下一个

var bmp = new Bitmap(yourImage.Width, yourImage.Height, System.Drawing.Imaging.PixelFormat.Format16bppRgb555);
using (var gr = Graphics.FromImage(bmp))
    gr.DrawImage(yourImage, new Rectangle(0, 0, yourImage.Width, yourImage.Height));



BMP - 将有16位质量

bmp - will have 16 bit quality

这篇关于如何转换位图图像与32位到16bit的在C#中的色彩质量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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