【问题标题】:How to convert between PIxelFormat? [duplicate]如何在 PIxelFormat 之间进行转换? [复制]
【发布时间】:2011-05-14 15:25:44
【问题描述】:

可能重复:
Converting Bitmap PixelFormats in C#

如何将不同PixelFormat的Bitmap转换为PixelFormat.Format32bppArgb格式?

【问题讨论】:

    标签: c# .net bitmap


    【解决方案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 位质量。将PixelFormat指定为您想要的内容

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-01-01
      • 1970-01-01
      • 2018-01-16
      • 1970-01-01
      • 2010-09-12
      • 1970-01-01
      • 2017-03-16
      • 2013-02-15
      相关资源
      最近更新 更多