No, 3 milliseconds for individual pixel is not the high price. It would be high price if it was average time per pixel for massive pixel operations. That simply should tell you that
GetPixel/SetPixel
is only acceptable when you only need to operate on just one pixel or very few of them. For all other cases, such operations are prohibitively slow. Can you see the point? If you have to touch 3 pixels, who would care about 10 milliseconds? If you need many pixels, you can sped more overall time, but its okay as you can read/modify a lot of pixels in one operation.
You need to use
Bitmap::LockBits
instead:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms536298%28v=vs.85%29.aspx[
^].
—SA