相关疑难解决方法(0)

在C#中转换位图PixelFormats

我需要将Bitmap转换PixelFormat.Format32bppRgbPixelFormat.Format32bppArgb.

我希望使用Bitmap.Clone,但似乎没有用.

Bitmap orig = new Bitmap("orig.bmp");
Bitmap clone = orig.Clone(new Rectangle(0,0,orig.Width,orig.Height), PixelFormat.Format24bppArgb);
Run Code Online (Sandbox Code Playgroud)

如果我运行上面的代码然后检查clone.PixelFormat它被设置为PixelFormat.Format32bppRgb.怎么回事/如何转换格式?

.net c# image

46
推荐指数
3
解决办法
7万
查看次数

标签 统计

.net ×1

c# ×1

image ×1