Well, threading has its overhead, but there are other problems which compromise your performance.
Never use
GetPixel
/
SetPixel
, it's too slow! (Unless you need just 1 or 2-3 pixels :-).) If this is
System.Drawing.Bitmap
, use
LockBits
/
UnlockBits
instead. Find a code sample here:
http://msdn.microsoft.com/en-us/library/5ey6h79d.aspx[
^].
You seemingly ignore the various Pixel Formats, this is unsafe, see
PixelFormat
.
ParameterizedThreadStart
makes no sense! If forces you into unsafe practice of type case. You can create a thread wrapper and pass its "this" reference instead. Please see my code sample here:
How to pass ref parameter to the thread[
^].
See my past answers on using threads with UI:
How to get a keydown event to operate on a different thread in vb.net[
^],
Control events not firing after enable disable + multithreading[
^].
Good luck,
—SA