Mercurial > octave-nkf
diff scripts/image/imwrite.m @ 15515:4beb3a4bd440
rgbplot.m, cmpermute.m, cmunique.m, ind2rgb.m, imwrite.m: use core iscolormap function
author | Carnë Draug <carandraug+dev@gmail.com> |
---|---|
date | Fri, 12 Oct 2012 23:11:08 +0200 |
parents | c2dbdeaa25df |
children | b1cd65881592 |
line wrap: on
line diff
--- a/scripts/image/imwrite.m Fri Oct 12 23:08:55 2012 +0200 +++ b/scripts/image/imwrite.m Fri Oct 12 23:11:08 2012 +0200 @@ -161,13 +161,8 @@ else error ("imwrite: %s: invalid class for indexed image data", img_class); endif - if (isa (map, "double")) - if (ndims (map) != 2 || columns (map) != 3) - error ("imwrite: invalid size for colormap"); - endif - else - error ("imwrite: %s invalid class for indexed image colormap", - class (map)); + if (! iscolormap (map)) + error ("imwrite: invalid indexed image colormap"); endif ## FIXME -- we should really be writing indexed images here but