Index: trunk/pstamp/src/ppstamp.c
===================================================================
--- trunk/pstamp/src/ppstamp.c	(revision 25156)
+++ trunk/pstamp/src/ppstamp.c	(revision 25197)
@@ -29,9 +29,5 @@
 
     // find the pixels that we need to copy, setup the output image
-    if (ppstampMakeStamp(config, options)) {
-        exitCode = 0;
-    } else {
-        exitCode = PS_EXIT_DATA_ERROR;
-    }
+    exitCode = ppstampMakeStamp(config, options);
 
     psLogMsg ("ppstamp", 3, "Complete ppstamp run: %f sec\n", psTimerMark(TIMERNAME));
Index: trunk/pstamp/src/ppstamp.h
===================================================================
--- trunk/pstamp/src/ppstamp.h	(revision 25156)
+++ trunk/pstamp/src/ppstamp.h	(revision 25197)
@@ -20,5 +20,5 @@
 bool ppstampParseCamera(pmConfig *config);
 
-bool ppstampMakeStamp(pmConfig *config, ppstampOptions *);
+int ppstampMakeStamp(pmConfig *config, ppstampOptions *);
 pmFPAfile * ppstampBuildMosaic(pmConfig *config, pmFPAfile *input, pmFPAview *view);
 
Index: trunk/pstamp/src/ppstampMakeStamp.c
===================================================================
--- trunk/pstamp/src/ppstampMakeStamp.c	(revision 25156)
+++ trunk/pstamp/src/ppstampMakeStamp.c	(revision 25197)
@@ -174,6 +174,6 @@
 static psImage *extractStamp(psImage *image, psRegion region, double value)
 {
-    int width  = region.x1 - region.x0;
-    int height = region.y1 - region.y0;
+    int width  = region.x1 - region.x0 + 0.5;
+    int height = region.y1 - region.y0 + 0.5;
 
     if (width < 0) {
@@ -252,5 +252,5 @@
 // Build the postage stamp output file
 
-static bool makeStamp(pmConfig *config, ppstampOptions *options, pmFPAfile *input,
+static int makeStamp(pmConfig *config, ppstampOptions *options, pmFPAfile *input,
                 pmChip *inChip, pmFPAview *view)
 {
@@ -260,5 +260,5 @@
     if (!output) {
         psError(PS_ERR_UNKNOWN, false, "Can't find output data\n");
-        return false;
+        return PS_EXIT_DATA_ERROR;
     }
     char *fpaName = psMetadataLookupStr(NULL, input->fpa->concepts, "FPA.OBS"); // Name of FPA
@@ -284,5 +284,5 @@
         pmFPAfile *mosaic = ppstampBuildMosaic(config, input, view);
         if (mosaic == NULL) {
-            return false;
+            return PS_EXIT_UNKNOWN_ERROR;
         }
         srcFile = mosaic;
@@ -362,5 +362,5 @@
         status = copyMetadata(output, input, inChip, options);
     }
-    return status;
+    return status ? PS_EXIT_SUCCESS : PS_EXIT_UNKNOWN_ERROR;
 }
 
@@ -574,8 +574,8 @@
 }
 
-bool ppstampMakeStamp (pmConfig *config, ppstampOptions *options)
+int ppstampMakeStamp (pmConfig *config, ppstampOptions *options)
 {
     bool        status = false;
-    bool        returnval = false;;
+    int        returnval = PS_EXIT_SUCCESS;;
     bool        foundOverlap = false;
 
@@ -583,5 +583,5 @@
     if (!status) {
         psError(PS_ERR_UNKNOWN, true, "Can't find input file!\n");
-        return false;
+        return PS_EXIT_DATA_ERROR;
     }
 
@@ -591,5 +591,5 @@
     } else if (astrom->camera != input->camera) {
         psError(PS_ERR_UNKNOWN, true, "Input camera and astrometry camera do not match");
-        return false;
+        return PS_EXIT_CONFIG_ERROR;
     }
 
@@ -600,5 +600,5 @@
         psError(PS_ERR_UNKNOWN, false, "Failed to load input.");
         psFree (view);
-        return false;
+        return PS_EXIT_DATA_ERROR;
     }
     bool bilevelAstrometry  = false;
@@ -614,5 +614,5 @@
             psError(PS_ERR_UNKNOWN, false, "Unable to read bilevel mosaic astrometry for input FPA.");
             psFree(view);
-            return false;
+            return PS_EXIT_DATA_ERROR;
         }
     }
@@ -647,5 +647,5 @@
             break;
         case PSTAMP_ERROR:
-            returnval = false;
+            returnval = PS_EXIT_UNKNOWN_ERROR;
             allDone = true;
             break;
@@ -667,6 +667,7 @@
     psFree(view);
 
-    if (!foundOverlap) {
+    if (!foundOverlap && (returnval == PS_EXIT_SUCCESS)) {
         fprintf(stderr, "ROI not found in input\n");
+        returnval = PSTAMP_NO_OVERLAP;
     }
 
Index: trunk/pstamp/src/pstamp.h
===================================================================
--- trunk/pstamp/src/pstamp.h	(revision 25156)
+++ trunk/pstamp/src/pstamp.h	(revision 25197)
@@ -42,5 +42,6 @@
 	PSTAMP_NOT_AVAILABLE    = 25,
 	PSTAMP_GONE             = 26,
-	PSTAMP_NO_JOBS_QUEUED   = 27
+	PSTAMP_NO_JOBS_QUEUED   = 27,
+        PSTAMP_NO_OVERLAP       = 28
 } pstampJobErrors;
 
