Index: trunk/ppImage/src/ppTest.c
===================================================================
--- trunk/ppImage/src/ppTest.c	(revision 11270)
+++ trunk/ppImage/src/ppTest.c	(revision 12566)
@@ -99,7 +99,8 @@
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
-    pmFPAPrint(stdout, fpa, false, true);
+#if 0
+    pmFPAPrint(stdout, fpa, false, false);
     exit(0);
-
+#endif
 
 #if 0
@@ -118,15 +119,14 @@
 #if 1
     psArray *chips = fpa->chips;
-    pmFPAWrite(fpa, outFile, NULL, false, false);
+    pmFPAWrite(fpa, outFile, NULL, true, false);
     for (int i = 0; i < chips->n; i++) {
-        printf("Chip %d\n", i);
         pmChip *chip = chips->data[i];
 #if 1
         //pmChipRead(chip, inFile, NULL);
-        pmChipWrite(chip, outFile, NULL, false, false);
+        pmChipWrite(chip, outFile, NULL, true, false);
         psArray *cells = chip->cells;
         for (int j = 0; j < cells->n; j++) {
             pmCell *cell = cells->data[j];
-            pmCellWrite(cell, outFile, NULL, false);
+            pmCellWrite(cell, outFile, NULL, true);
 #if 0 // Read bit by bit
             pmReadout *readout = pmReadoutAlloc(cell);
@@ -140,8 +140,10 @@
             psFree(readout);
 #else // Read the whole cell at once
-            pmCellRead(cell, inFile, NULL);
-            pmCellWrite(cell, outFile, NULL, true);
+            //            pmCellRead(cell, inFile, NULL);
+            //            pmCellWrite(cell, outFile, NULL, false);
+            //            pmCellFreeData(cell);
 #endif
         }
+        pmChipWrite(chip, outFile, NULL, false, false);
 #endif
 
@@ -153,4 +155,5 @@
 #endif
     }
+    pmFPAWrite(fpa, outFile, NULL, false, false);
 #endif
 
@@ -166,5 +169,5 @@
 
 #if 1
-    pmFPAPrint(stdout, fpa, true, true);
+    pmFPAPrint(stdout, fpa, false, false);
 #endif
 
