How to fasten Bitmap.SetPixel without using unsafe method?
-
24-06-2021 - |
質問
How can I fasten Bitmap Set/GetPixel method without using unsafe mode or any other solutions from codeproject like FastPixel or FastBitmap (which actually also uses unsafe mode).
解決
Here I found the answer Use System.Runtime.InteropServices.Marshal.Copy and no unsafe keyword is needed! Almost the same effective as unsafe method and still way way faster than get/sex pixel.
所属していません StackOverflow