开发者

How to convert between PIxelFormat? [duplicate]

This question already has answers here: 开发者_如何学运维 Closed 11 years ago.

Possible Duplicate:

Converting Bitmap PixelFormats in C#

How to convert a Bitmap with different PixelFormat to the PixelFormat.Format32bppArgb format?


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. Specify PixelFormat to what you want

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜