Index: trunk/ppImage/src/ppImageOptions.c
===================================================================
--- trunk/ppImage/src/ppImageOptions.c	(revision 6817)
+++ trunk/ppImage/src/ppImageOptions.c	(revision 6849)
@@ -23,5 +23,5 @@
 ppImageOptions *ppImageOptionsParse(pmConfig *config)
 {
-
+    bool status;
     ppImageOptions *options = ppImageOptionsAlloc ();
 
@@ -137,23 +137,26 @@
 
     // Mask recipe options
-    if (psMetadataLookupBool(NULL, recipe, "MASK")) {
-	options->doMask = true;
-    }
+    options->doMask = psMetadataLookupBool(NULL, recipe, "MASK");
+    options->doBias = psMetadataLookupBool(NULL, recipe, "BIAS");
+    options->doDark = psMetadataLookupBool(NULL, recipe, "DARK");
+    options->doFlat = psMetadataLookupBool(NULL, recipe, "FLAT");
 
-    // Bias recipe options
-    if (psMetadataLookupBool(NULL, recipe, "BIAS")) {
-	options->doBias = true;
-    }
+    // binned image options
+    options->xBin1 = psMetadataLookupS32(&status, recipe, "BIN1.XBIN"); 
+    if (!status) options->xBin1 = 16;
+    options->yBin1 = psMetadataLookupS32(&status, recipe, "BIN1.YBIN"); 
+    if (!status) options->yBin1 = 16;
 
-    // Dark recipe options
-    if (psMetadataLookupBool(NULL, recipe, "DARK")) {
-	options->doDark = true;
-    }
+    options->xBin2 = psMetadataLookupS32(&status, recipe, "BIN2.XBIN"); 
+    if (!status) options->xBin1 = 16;
+    options->yBin2 = psMetadataLookupS32(&status, recipe, "BIN2.YBIN"); 
+    if (!status) options->yBin1 = 16;
 
-    // Flat recipe options
-    if (psMetadataLookupBool(NULL, recipe, "FLAT")) {
-	options->doFlat = true;
-    }
+    options->doBin1 = psMetadataLookupBool(NULL, recipe, "BIN1.FITS");
+    options->doBin2 = psMetadataLookupBool(NULL, recipe, "BIN2.FITS");
 
+    // options->doBin1JPEG = psMetadataLookupBool(NULL, recipe, "BIN1.JPEG");
+    // options->doBin2JPEG = psMetadataLookupBool(NULL, recipe, "BIN2.JPEG");
+    
     return options;
 }
