【问题标题】:How to convert bitmap image with 32bit to 16bit color quality in C#如何在 C# 中将具有 32 位颜色质量的位图图像转换为 16 位颜色质量
【发布时间】:2011-03-03 16:47:02
【问题描述】:

我们有两个图像,第一个图像是在 WindowsXP 中捕获的 32 位颜色质量和在 Windows XP 中捕获的 16 位颜色质量相同。两个图像都已保存为位图图像。但是在比较两者时,我们观察到哈希值不同。这里我们计划实现C#代码,将32bit彩色质量图像转换为16bit彩色质量图像。

有没有人研究过这种位图图像比较问题,对此方面的任何输入将不胜感激。

提前非常感谢。

【问题讨论】:

    标签: c# visual-studio-2008 image


    【解决方案1】:

    尝试使用下一个

    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 位质量

    【讨论】:

      猜你喜欢
      • 2011-04-23
      • 1970-01-01
      • 2015-09-22
      • 1970-01-01
      • 2018-04-01
      • 2011-08-23
      • 2022-11-25
      • 2016-10-09
      • 2015-05-02
      相关资源
      最近更新 更多