Index: trunk/magic/remove/src/streaksremove.c
===================================================================
--- trunk/magic/remove/src/streaksremove.c	(revision 30315)
+++ trunk/magic/remove/src/streaksremove.c	(revision 30405)
@@ -771,5 +771,5 @@
             }
         }
-    } else {
+    } else if (sfiles->inImage->image->type.type == PS_TYPE_F32) {
         float imageValue  = sfiles->inImage->image->data.F32[y][x];
         if (sfiles->recImage && !isExciseValue(imageValue, sfiles->inImage->exciseValue) ) {
@@ -787,12 +787,28 @@
             }
         }
+    } else {
+        // We could handle F64 but I don't think we ever get them.
+        // Should catch this earlier
+        psError(PS_ERR_IO, true, "unexpected image type %x found", sfiles->inImage->image->type.type );
+        streaksExit("", PS_EXIT_PROG_ERROR);
     }
 
     if (sfiles->outWeight) {
-        if (sfiles->recWeight) {
-            sfiles->recWeight->image->data.F32[y][x] = sfiles->inWeight->image->data.F32[y][x];
-        }
         // Assume that weight images are always a floating point type
-        sfiles->outWeight->image->data.F32[y][x] = NAN;
+        if (sfiles->inWeight->image->type.type == PS_TYPE_F32) {
+            if (sfiles->recWeight) {
+                sfiles->recWeight->image->data.F32[y][x] = sfiles->inWeight->image->data.F32[y][x];
+            }
+            sfiles->outWeight->image->data.F32[y][x] = NAN;
+        } else if (sfiles->inWeight->image->type.type == PS_TYPE_F64) {
+            if (sfiles->recWeight) {
+                sfiles->recWeight->image->data.F64[y][x] = sfiles->inWeight->image->data.F64[y][x];
+            }
+            sfiles->outWeight->image->data.F64[y][x] = NAN;
+        } else {
+            // Should catch this earlier
+            psError(PS_ERR_IO, true, "unexpected weight image type %x found", sfiles->inWeight->image->type.type );
+            streaksExit("", PS_EXIT_PROG_ERROR);
+        }
     }
     if (sfiles->outMask) {
