Bitmap.SetPixel(x,y, Color) too slow

前端 未结 4 1565
醉话见心
醉话见心 2021-01-19 17:44

So currently I\'m creating a 1000x1000 bitmap and it\'s spending about .3 seconds simply calling the Bitmap.SetPixel() function.

I\'m actually only drawing probably

4条回答
  •  一个人的身影
    2021-01-19 18:27

    I can recommend FastBitmap:

    FastBitmap fb = new FastBitmap(b);
    fb.LockImage();
    
    ...
    
    fb.SetPixel(x, y, Color.Red);
    
    ...
    
    fb.UnlockImage();
    

提交回复
热议问题