【发布时间】:2021-01-17 07:25:37
【问题描述】:
问这个问题很尴尬却找不到答案。
我试过这个是徒劳的。
Image resultImage = new Bitmap(image1.Width, image1.Height, PixelFormat.Format24bppRgb);
using (Graphics grp = Graphics.FromImage(resultImage))
{
grp.FillRectangle(
Brushes.White, 0, 0, image1.Width, image1.Height);
resultImage = new Bitmap(image1.Width, image1.Height, grp);
}
我基本上想在 C# 中用白色填充 1024x1024 RGB 位图图像。我该怎么做?
【问题讨论】:
-
您正在为您的问题寻找解决方案,但您的代码解决了我的问题,谢谢 :)
标签: c#