changeset 762:00409c568443

montage: fix bug when getting filename for multipage files
author carandraug
date Thu, 06 Jun 2013 13:31:02 +0000
parents 307eee5730bf
children 143dbc3bb141
files inst/montage.m
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/inst/montage.m
+++ b/inst/montage.m
@@ -142,10 +142,9 @@
       page_range = nRead+1-nPages:nRead;
 
       ## we won't be handling the alpha channel, but matlab doesn't either
-      if (size (images, 3) == 1 ||
-          all (strcmp ({img_info(:).ColorType}, "truecolor")))
+      if (size (images, 3) == 1 || all (strcmp ({img_info(:).ColorType}, "truecolor")))
         ## sweet, no problems for sure
-        [images(:,:,:,page_range), map] = imread (img_info.Filename, 1:nPages);
+        [images(:,:,:,page_range), map] = imread (img_info(idx).Filename, 1:nPages);
       else
         [tmp_img, map] = imread (fullpaths(:), 1:nPages);
         if (! isempty (map))