Index: trunk/ppImage/src/ppImageParseCamera.c
===================================================================
--- trunk/ppImage/src/ppImageParseCamera.c	(revision 16357)
+++ trunk/ppImage/src/ppImageParseCamera.c	(revision 16844)
@@ -59,5 +59,5 @@
     }
     if (options->doDark) {
-        if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.DARK", "DARK", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_DARK)) {
+        if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.DARK", "DARK", PM_FPA_FILE_DARK, PM_DETREND_TYPE_DARK)) {
             psError (PS_ERR_IO, false, "Can't find a dark image source");
             psFree (options);
@@ -393,4 +393,9 @@
         outImage->type = PM_FPA_FILE_FRINGE;
     }
+    if (psMetadataLookupBool(NULL, config->arguments, "INPUT_IS_DARK")) {
+        // It's a dark file, so change the file type
+        input->type = PM_FPA_FILE_DARK;
+        outImage->type = PM_FPA_FILE_DARK;
+    }
 
     // Turn off mask and weight output if we're not doing anything interesting
