C# - 用于Windows窗体应用程序的BitPps的SetPixel和GetPixel的更快替代品
我正在尝试自学C#,并从各种来源听说函数get和setpixel可能非常慢。有哪些替代方案,性能改进真的那么重要吗?提前致谢!
我的一大块代码供参考:
public static Bitmap Paint(Bitmap _b, Color f){
Bitmap b = new Bitmap(_b);
for (int x = 0; x < b.Width; x++)
{
for (int y = 0; y < b.Height; y++)
{
Color c = b.GetPixel(x, y);
b.SetPixel(x, y, Color.FromArgb(c.A, f.R, f.G, f.B));
}
}
return b;}
LEATH
慕无忌1623718
杨魅力
随时随地看视频慕课网APP
相关分类