comparison scripts/image/imformats.m @ 18292:4718af222d9d

image/imformats.m: be case insensitive about file extension.
author Carnë Draug <carandraug@octave.org>
date Thu, 16 Jan 2014 17:54:59 +0000
parents 3ef7d28833f3
children 1589b2fc74ae
comparison
equal deleted inserted replaced
18291:9b163d6c1de7 18292:4718af222d9d
264 error ("imformats: structure has missing field `%s'.", min_fields(! fields_mask){1}); 264 error ("imformats: structure has missing field `%s'.", min_fields(! fields_mask){1});
265 endif 265 endif
266 endfunction 266 endfunction
267 267
268 function match = find_ext_idx (formats, ext) 268 function match = find_ext_idx (formats, ext)
269 ## FIXME: is matlab sensitive to file extensions?
270 ## XXX: what should we do if there's more than one hit? 269 ## XXX: what should we do if there's more than one hit?
271 ## Should this function prevent the addition of 270 ## Should this function prevent the addition of
272 ## duplicated extensions? 271 ## duplicated extensions?
273 match = cellfun (@(x) any (strcmp (x, ext)), {formats.ext}); 272 match = cellfun (@(x) any (strcmpi (x, ext)), {formats.ext});
274 endfunction 273 endfunction
275 274
276 function bool = isa_magick (coder, filename) 275 function bool = isa_magick (coder, filename)
277 bool = false; 276 bool = false;
278 try 277 try