Mercurial > hg > octave-thorsten
diff scripts/image/imwrite.m @ 11035:8a6b7947f618
Added support for checking supported image types at runtime.
author | John Swensen <jpswensen@gmail.com> |
---|---|
date | Tue, 28 Sep 2010 17:24:24 -0400 |
parents | 165e7e79b82c |
children | 35416c9baf76 |
line wrap: on
line diff
--- a/scripts/image/imwrite.m +++ b/scripts/image/imwrite.m @@ -65,11 +65,12 @@ function imwrite (img, varargin) - %missing_formats = { "hdf", "jp2", "jpx" }; - persistent accepted_formats = { "bmp", "gif", "jpg", "jpeg", ... - "pbm", "pcx", "pgm", "png", "pnm", "ppm", "ras", ... - "tif", "tiff", "xwd" }; + persistent imwrite_possible_formats = { + "bmp" "gif"; "jp2"; "jpg"; "jpx"; "jpeg"; "hdf"; "pbm"; "pcx"; + "pgm"; "png"; "pnm"; "ppm"; "ras"; "tif"; "tiff"; "xwd" }; + persistent accepted_formats = __magick_format_list__ (imwrite_possible_formats); + if (nargin < 2 || ! (isnumeric (img) || islogical (img))) print_usage (); endif