How to convert bitmap image with 32bit to 16bit color quality in C#

后端 未结 1 980
时光取名叫无心
时光取名叫无心 2021-01-20 23:59

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 bi

相关标签:
1条回答
  • 2021-01-21 00:43

    Try to use next

    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 - will have 16 bit quality

    0 讨论(0)
提交回复
热议问题