Index: trunk/psphot/src/pmSourceContour.c
===================================================================
--- trunk/psphot/src/pmSourceContour.c	(revision 5672)
+++ trunk/psphot/src/pmSourceContour.c	(revision 5718)
@@ -100,5 +100,5 @@
 new implementation of source contour function
 *****************************************************************************/
-psArray *pmSourceContour_EAM (psImage *image, int x, int y, float threshold) {
+psArray *pmSourceContour_EAM (psImage *image, int xc, int yc, float threshold) {
 
     int xR, yR, x0, x1, x0s, x1s;
@@ -106,4 +106,7 @@
     psTrace(__func__, 3, "---- %s() begin ----\n", __func__);
     PS_ASSERT_PTR_NON_NULL(image, false);
+
+    int x = xc - image->col0;
+    int y = yc - image->row0;
 
     // the requested point must be within the contour
@@ -141,5 +144,5 @@
 	    x0 = findContourPos (image, threshold, xR, yR, RIGHT, x1);
 	    if (x0 == x1) {
-		fprintf (stderr, "top: %d (%d - %d)\n", yR, xR, x1);
+		// fprintf (stderr, "top: %d (%d - %d)\n", yR, xR, x1);
 		goto pt1;
 	    }
@@ -150,5 +153,5 @@
 	    x1 = findContourNeg (image, threshold, xR, yR, RIGHT);
 	}
-	fprintf (stderr, "pos: %d (%d - %d)\n", yR, x0, x1);
+	// fprintf (stderr, "pos: %d (%d - %d)\n", yR, x0, x1);
 
         xVec->data.F32[Npt + 0] = image->col0 + x0;
@@ -175,5 +178,5 @@
 	    x0 = findContourPos (image, threshold, xR, yR, RIGHT, x1);
 	    if (x0 == x1) {
-		fprintf (stderr, "top: %d (%d - %d)\n", yR, xR, x1);
+		// fprintf (stderr, "top: %d (%d - %d)\n", yR, xR, x1);
 		goto pt2;
 	    }
@@ -184,5 +187,5 @@
 	    x1 = findContourNeg (image, threshold, xR, yR, RIGHT);
 	}
-	fprintf (stderr, "neg: %d (%d - %d)\n", yR, x0, x1);
+	// fprintf (stderr, "neg: %d (%d - %d)\n", yR, x0, x1);
 
         xVec->data.F32[Npt + 0] = image->col0 + x0;
@@ -202,5 +205,5 @@
     yVec->n = Npt;
 
-    fprintf (stderr, "done\n");
+    // fprintf (stderr, "done\n");
     psArray *tmpArray = psArrayAlloc(2);
     tmpArray->data[0] = (psPtr *) xVec;
