Index: trunk/ppImage/src/ppImageLoop.c
===================================================================
--- trunk/ppImage/src/ppImageLoop.c	(revision 15216)
+++ trunk/ppImage/src/ppImageLoop.c	(revision 15933)
@@ -90,4 +90,10 @@
         }
 
+	// replace the masked pixels with the background level
+	if (options->replaceMasked) {
+	    if (!ppImageReplaceBackground (config, view, options)) 
+		ESCAPE ("Unable to replace masked pixels with background level");
+	}
+
         // Close cells (XXX shouldn't pmFPAfileClose iterate down as needed?)
         view->cell = -1;
