Index: trunk/ppImage/src/ppImageMosaic.c
===================================================================
--- trunk/ppImage/src/ppImageMosaic.c	(revision 28262)
+++ trunk/ppImage/src/ppImageMosaic.c	(revision 28263)
@@ -28,4 +28,20 @@
     }
 
+    // If the input is a dark (normalising and mosaicking) then it looks like a video cell and will be ignored
+    // by pmChipMosaic.  We therefore hack the structure so it doesn't look like a video cell.
+    psVector *darkNumbers = NULL;       // Number of dark readouts for each cell
+    psVectorInit(darkNumbers, 0);
+    if (psMetadataLookupBool(&status, config->arguments, "INPUT_IS_DARK")) {
+        darkNumbers = psVectorAlloc(inChip->cells->n, PS_TYPE_S32);
+        for (int i = 0; i < inChip->cells->n; i++) {
+            pmCell *cell = inChip->cells->data[i];
+            if (!cell) {
+                continue;
+            }
+            darkNumbers->data.S32[i] = cell->readouts->n;
+            cell->readouts->n = 1;
+        }
+    }
+
     psTrace("pmChipMosaic", 5, "mosaic chip %s to %s (xbin,ybin: %d,%d to %d,%d)\n",
             in->name, out->name, in->xBin, in->yBin, out->xBin, out->yBin);
@@ -34,4 +50,17 @@
     // image products pure trimmed images, but also increases the memory footprint.
     status = pmChipMosaic(outChip, inChip, true, options->blankMask);
+
+    // Restore dark structure
+    if (darkNumbers) {
+        for (int i = 0; i < inChip->cells->n; i++) {
+            pmCell *cell = inChip->cells->data[i];
+            if (!cell) {
+                continue;
+            }
+            cell->readouts->n = darkNumbers->data.S32[i];
+        }
+        psFree(darkNumbers);
+    }
+
     return status;
 }
