# HG changeset patch # User Rik # Date 1551597673 28800 # Node ID 880466837c0672a2349b861d8c23e570acb169b8 # Parent 92ecc4a97b5cc521042bbf059510c30adeaac945 imshow.m: Read indexed images correctly when only file name given (bug #49137). * imshow.m: After call to imread, check whether map is empty or not to determine whether image is indexed. diff -r 92ecc4a97b5c -r 880466837c06 scripts/image/imshow.m --- a/scripts/image/imshow.m Thu Feb 28 23:06:25 2019 +0100 +++ b/scripts/image/imshow.m Sat Mar 02 23:21:13 2019 -0800 @@ -86,8 +86,12 @@ ## Get the image. if (ischar (im)) [im, map] = imread (im); - indexed = true; - colormap (gca, map); + if (isempty (map)) + indexed = false; + else + indexed = true; + colormap (gca, map); + endif endif nd = ndims (im);