Index: trunk/stac/src/shift.c
===================================================================
--- trunk/stac/src/shift.c	(revision 6771)
+++ trunk/stac/src/shift.c	(revision 6887)
@@ -126,4 +126,5 @@
     psArray *maps = psArrayAlloc(1);    // An array of one
     psArray *masks = psArrayAlloc(1);   // An array of one
+    images->n = maps->n = masks->n = 1;
     images->data[0] = image;
     maps->data[0] = map;
@@ -132,5 +133,13 @@
     // Get size
     if (outnx == 0 || outny == 0) {
-        stacSize(&outnx, &outny, NULL, NULL, images, maps);
+        psVector *xSize = psVectorAlloc(1, PS_TYPE_S32); // A vector of one
+        psVector *ySize = psVectorAlloc(1, PS_TYPE_S32); // A vector of one
+        xSize->n = 1;
+        ySize->n = 1;
+        xSize->data.S32[0] = image->numCols;
+        ySize->data.S32[0] = image->numRows;
+        stacSize(&outnx, &outny, NULL, NULL, xSize, ySize, maps);
+        psFree(xSize);
+        psFree(ySize);
     }
 
