diff --git a/ReactionRecorder.cs b/ReactionRecorder.cs --- a/ReactionRecorder.cs +++ b/ReactionRecorder.cs @@ -313,9 +313,9 @@ namespace DesertPaintLab bool result = true; - int solidUpperLeft = testPixelStart + ((y+2) * stride) + ((x+2) * 3); - int solidLowerLeft = testPixelStart + ((swatchHeight - 4) * stride); - int solidUpperRight = testPixelStart + ((swatchWidth - 4) * 3); + int solidUpperLeft = testPixelStart + (2 * stride) + (2 * 3); + int solidLowerLeft = solidUpperLeft + ((swatchHeight - 4) * stride); + int solidUpperRight = solidUpperLeft + ((swatchWidth - 4) * 3); int solidLowerRight = solidLowerLeft + ((swatchWidth - 4) * 3); byte swatch_r = pixBytes[solidUpperLeft]; byte swatch_g = pixBytes[solidUpperLeft + 1];