Index: trunk/stac/src/stacRejection.c
===================================================================
--- trunk/stac/src/stacRejection.c	(revision 9740)
+++ trunk/stac/src/stacRejection.c	(revision 12744)
@@ -111,4 +111,8 @@
 #endif
 
+        psImageInterpolateOptions *interp = psImageInterpolateOptionsAlloc(PS_INTERPOLATE_BILINEAR,
+                                                                           reject, NULL, NULL, 0, 0.0, 0.0,
+                                                                           0, 0, 0.0);
+
         // Transform the mask
         // Optimisation option is to only transform the pixels that have been rejected in the output,
@@ -125,6 +129,14 @@
                     inCoords->y = (double)y + 0.5;
                     (void)psPlaneTransformApply(outCoords, map, inCoords);
-                    float maskVal = (float)psImagePixelInterpolate(reject, outCoords->x, outCoords->y,
-                                                                   NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR);
+                    double maskVal;
+                    if (!psImageInterpolate(&maskVal, NULL, NULL, outCoords->x, outCoords->y, interp)) {
+                        psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image.");
+                        psFree(grads);
+                        psFree(gradsMask);
+                        psFree(inCoords);
+                        psFree(outCoords);
+                        return NULL;
+                    }
+
 #ifdef TESTING
                     rejmap->data.F32[y][x] = maskVal;
