changeset 1886:1c5311a0c06f

[project @ 1996-02-06 15:30:29 by jwe]
author jwe
date Tue, 06 Feb 1996 15:30:29 +0000
parents 7a5f049849b2
children 5d29638dd524
files scripts/image/saveimage.m
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/image/saveimage.m
+++ b/scripts/image/saveimage.m
@@ -112,7 +112,7 @@
 
 # Convert to another format if requested.
 
-  grey = ! (any (map(:,1) != map(:,2) || map(:,1) != map (:,3)));
+  grey = all (map(:,1) == map(:,2) && map(:,1) == map (:,3))
 
   pbm = pgm = ppm = 0;
 
@@ -190,14 +190,14 @@
 
     else
 
-      img_idx = (1:3:3*img_sz)+2;
-      map_idx = (2*map_nr+1):map_sz;
+      img_idx = ((1:3:3*img_sz)+2)';
+      map_idx = ((2*map_nr+1):map_sz)';
 
       tmap = map(map_idx);
       tmp(img_idx--) = tmap(img);
 
       map_idx = map_idx - map_nr;
-      tmap = map(map_idx);
+      tmap = map(map_idx,:);
       tmp(img_idx--) = tmap(img);
 
       map_idx = map_idx - map_nr;