Index: trunk/magic/remove/src/streaksio.c
===================================================================
--- trunk/magic/remove/src/streaksio.c	(revision 28514)
+++ trunk/magic/remove/src/streaksio.c	(revision 29392)
@@ -1266,40 +1266,7 @@
         return;
     }
-    if (sfiles->inMask && sfiles->inMask->header) {
-        if (!pmConfigMaskReadHeader(sfiles->config, sfiles->inMask->header)) {
-            streaksExit("failed to read mask values from file", PS_EXIT_CONFIG_ERROR);
-        }
-    }
-
-    bool status;
-    psMetadata *masks = psMetadataLookupMetadata(&status, sfiles->config->recipes, "MASKS");
-    if (!status) {
-        psError(PM_ERR_CONFIG, false, "failed to lookup MASKS in recipes\n");
-        streaksExit("", PS_EXIT_CONFIG_ERROR);
-    }
-    sfiles->maskStreak = psMetadataLookupU32(&status, masks, "STREAK");
-    if (!status) {
-        psError(PM_ERR_CONFIG, false, "failed to lookup mask value for STREAK in recipes\n");
-        streaksExit("", PS_EXIT_CONFIG_ERROR);
-    }
-
-    // optionally setting pixels with any mask bits execpt CONV.POOR to NAN
-    // check old name first
-    psU32 convPoor = (double) psMetadataLookupU32(&status, masks, "POOR.WARP");
-    if (!status) {
-        convPoor = (double) psMetadataLookupU32(&status, masks, "CONV.POOR");
-        if (!status) {
-            psError(PM_ERR_CONFIG, false, "failed to lookup mask value for CONV.POOR in recipes\n");
-            streaksExit("", PS_EXIT_CONFIG_ERROR);
-        }
-    }
-    // preserve pixels that are only suspect
-    psU32 suspect = (double) psMetadataLookupU32(&status, masks, "SUSPECT");
-    if (!status) {
-        psError(PM_ERR_CONFIG, false, "failed to lookup mask value for SUSPECT in recipes\n");
-        streaksExit("", PS_EXIT_CONFIG_ERROR);
-    }
-
-    sfiles->maskMask = ~(convPoor | suspect);
+    if (!pmCensorGetMasks(sfiles->config, &sfiles->maskMask, &sfiles->maskStreak)) {
+        streaksExit("failed to find mask values", PS_EXIT_CONFIG_ERROR);
+    }
 }
 
