Index: trunk/psModules/src/camera/pmFPA_JPEG.c
===================================================================
--- trunk/psModules/src/camera/pmFPA_JPEG.c	(revision 10417)
+++ trunk/psModules/src/camera/pmFPA_JPEG.c	(revision 10421)
@@ -5,6 +5,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-12-02 04:24:48 $
+ *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-12-03 18:48:10 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -31,5 +31,5 @@
 
 
-bool pmFPAviewWriteJPEG(const pmFPAview *view, pmFPAfile *file)
+bool pmFPAviewWriteJPEG(const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(view, false);
@@ -39,5 +39,5 @@
 
     if (view->chip == -1) {
-        pmFPAWriteJPEG (fpa, view, file);
+        pmFPAWriteJPEG (fpa, view, file, config);
         return true;
     }
@@ -49,5 +49,5 @@
 
     if (view->cell == -1) {
-        pmChipWriteJPEG (chip, view, file);
+        pmChipWriteJPEG (chip, view, file, config);
         return true;
     }
@@ -59,5 +59,5 @@
 
     if (view->readout == -1) {
-        pmCellWriteJPEG (cell, view, file);
+        pmCellWriteJPEG (cell, view, file, config);
         return true;
     }
@@ -68,10 +68,10 @@
     pmReadout *readout = cell->readouts->data[view->readout];
 
-    pmReadoutWriteJPEG (readout, view, file);
+    pmReadoutWriteJPEG (readout, view, file, config);
     return true;
 }
 
 // read in all chip-level JPEG files for this FPA
-bool pmFPAWriteJPEG (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file)
+bool pmFPAWriteJPEG (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(fpa, false);
@@ -82,5 +82,5 @@
 
         pmChip *chip = fpa->chips->data[i];
-        pmChipWriteJPEG (chip, view, file);
+        pmChipWriteJPEG (chip, view, file, config);
     }
     return true;
@@ -88,5 +88,5 @@
 
 // read in all cell-level JPEG files for this chip
-bool pmChipWriteJPEG (pmChip *chip, const pmFPAview *view, pmFPAfile *file)
+bool pmChipWriteJPEG (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(chip, false);
@@ -97,5 +97,5 @@
 
         pmCell *cell = chip->cells->data[i];
-        pmCellWriteJPEG (cell, view, file);
+        pmCellWriteJPEG (cell, view, file, config);
     }
     return true;
@@ -103,5 +103,5 @@
 
 // read in all readout-level JPEG files for this cell
-bool pmCellWriteJPEG (pmCell *cell, const pmFPAview *view, pmFPAfile *file)
+bool pmCellWriteJPEG (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(cell, false);
@@ -112,5 +112,5 @@
 
         pmReadout *readout = cell->readouts->data[i];
-        pmReadoutWriteJPEG (readout, view, file);
+        pmReadoutWriteJPEG (readout, view, file, config);
     }
     return true;
@@ -118,5 +118,5 @@
 
 // read in all readout-level Objects files for this cell
-bool pmReadoutWriteJPEG (pmReadout *readout, const pmFPAview *view, pmFPAfile *file)
+bool pmReadoutWriteJPEG (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
@@ -178,4 +178,5 @@
 
     psString name = pmFPAfileNameFromRule (file->filerule, file, view);
+    psString newName = pmConfigConvertFilename (name, config);
     psString mapname = pmFPAfileNameFromRule (file->filextra, file, view);
     psImageJpegColormap *map = psImageJpegColormapSet (NULL, mapname);
@@ -185,5 +186,6 @@
     }
 
-    psImageJpeg (map, readout->image, name, min, max);
+    psImageJpeg (map, readout->image, newName, min, max);
+    psFree(newName);
     psFree(name);
     psFree(map);
