Original Post
I have been reading about matrix operations and have a question.
Take a look at the following article http://www.switchonthecode.com/tutorials/csharp-tutorial-convert-a-color-image-to-grayscale
I understand why example 2 is quicker than example 1 due to the way the data is being accessed. However I do not understand why example 3 is quicker than example 2 as surely although it is using a built in gdi+ method to alter the pixels both examples are still having to effectively set the pixel values in the same way (ie adding values to each pixel)?
If anyone can explain the difference to me then I would be grateful.
Take a look at the following article http://www.switchonthecode.com/tutorials/csharp-tutorial-convert-a-color-image-to-grayscale
I understand why example 2 is quicker than example 1 due to the way the data is being accessed. However I do not understand why example 3 is quicker than example 2 as surely although it is using a built in gdi+ method to alter the pixels both examples are still having to effectively set the pixel values in the same way (ie adding values to each pixel)?
If anyone can explain the difference to me then I would be grateful.