Index: trunk/psModules/src/imcombine/pmSubtractionStamps.c
===================================================================
--- trunk/psModules/src/imcombine/pmSubtractionStamps.c	(revision 13340)
+++ trunk/psModules/src/imcombine/pmSubtractionStamps.c	(revision 13364)
@@ -60,6 +60,6 @@
     PS_ASSERT_INT_LARGER_THAN(image->numRows, (2 * footprint), NULL);
 
-    int xNumStamps = image->numCols / spacing; // Number of stamps in x dimension
-    int yNumStamps = image->numRows / spacing; // Number of stamps in y dimension
+    int xNumStamps = image->numCols / spacing + 1; // Number of stamps in x dimension
+    int yNumStamps = image->numRows / spacing + 1; // Number of stamps in y dimension
 
     if (stamps) {
@@ -95,8 +95,8 @@
 
                 // Bounds of region to search for stamp
-                int yMin = footprint + j * (numCols - 2.0 * footprint) / yNumStamps;
-                int yMax = footprint + (j + 1) * (numCols - 2.0 * footprint) / yNumStamps - 1;
-                int xMin = footprint + i * (numRows - 2.0 * footprint) / xNumStamps;
-                int xMax = footprint + (i + 1) * (numRows - 2.0 * footprint) / xNumStamps - 1;
+                int yMin = footprint + j * (numRows - 2.0 * footprint) / yNumStamps;
+                int yMax = footprint + (j + 1) * (numRows - 2.0 * footprint) / yNumStamps - 1;
+                int xMin = footprint + i * (numCols - 2.0 * footprint) / xNumStamps;
+                int xMax = footprint + (i + 1) * (numCols - 2.0 * footprint) / xNumStamps - 1;
                 assert(yMax < image->numRows && xMax < image->numCols && yMin >= 0 && xMin >= 0);
 
