Mercurial > hg > octave-avbm
changeset 10985:165e7e79b82c
Updated for writing image files via imwrite.
author | John Swensen <jpswensen@gmail.com> |
---|---|
date | Thu, 16 Sep 2010 02:56:35 -0400 (2010-09-16) |
parents | 58c57161626d |
children | 20bb05b9fb3f |
files | scripts/ChangeLog scripts/image/imwrite.m src/ChangeLog src/DLD-FUNCTIONS/__magick_read__.cc |
diffstat | 4 files changed, 40 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2010-09-16 John Swensen <jpswensen@gmail.com> + + * imwrite.m: Accept more image formats. + 2010-09-16 Jaroslav Hajek <highegg@gmail.com> * signal/periodogram.m: Support additional inputs:
--- a/scripts/image/imwrite.m +++ b/scripts/image/imwrite.m @@ -36,13 +36,39 @@ ## quality and lower compression. ## @end table ## +## @strong{Supported Formats} +## @multitable @columnfractions .33 .66 +## @headitem Extension @tab Format +## @item bmp @tab Windows Bitmap +## @item gif @tab Graphics Interchange Format +## @item jpg and jpeg @tab Joint Photographic Experts Group +## @item pbm @tab Portable Bitmap +## @item pcx @tab +## @item pgm @tab Portable Graymap +## @item png @tab Portable Network Graphics +## @item pnm @tab Portable Anymap +## @item ppm @tab Portable Pixmap +## @item ras @tab Sun Raster +## @item tif and tiff @tab Tagged Image File Format +## @item xwd @tab X11 Dump +## @end multitable +## +## @strong{Unsupported Formats} +## @multitable @columnfractions .33 .66 +## @headitem Extension @tab Format +## @item hdf @tab Hierarchical Data Format V4 +## @item jp2 and jpx @tab Joint Photographic Experts Group 2000 +## @end multitable +## ## @seealso{imread, imfinfo} ## @end deftypefn function imwrite (img, varargin) - + + %missing_formats = { "hdf", "jp2", "jpx" }; persistent accepted_formats = { "bmp", "gif", "jpg", "jpeg", ... - "ras", "pbm", "pgm", "png", "ppm", "svg", "tif", "tiff" }; + "pbm", "pcx", "pgm", "png", "pnm", "ppm", "ras", ... + "tif", "tiff", "xwd" }; if (nargin < 2 || ! (isnumeric (img) || islogical (img))) print_usage ();
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,11 +1,16 @@ +2010-09-16 John Swensen <jpswensen@gmail.com> + + * DLD-FUNCTIONS/__magick_read__.cc (write_images): Allow + arbitrary extensions with format specifier. + 2010-09-15 John W. Eaton <jwe@octave.org> * load-path.cc (Faddpath, Frmpath): Document path arguments. 2010-09-15 John Swensen <jpswensen@gmail.com> - * __magick_read__.cc: Allow image_write to write filetypes - without an extension (bug #30784). + * DLD-FUNCTIONS/__magick_read__.cc (write_image): Allow writing + arbitrary image types to filenames without an extension (bug #30784). 2010-09-14 John W. Eaton <jwe@octave.org>
--- a/src/DLD-FUNCTIONS/__magick_read__.cc +++ b/src/DLD-FUNCTIONS/__magick_read__.cc @@ -837,7 +837,7 @@ for (size_t i = 0; i < imvec.size (); i++) imvec[i].magick (fmt); - Magick::writeImages (imvec.begin (), imvec.end (), filename); + Magick::writeImages (imvec.begin (), imvec.end (), fmt + ":" + filename); } catch (Magick::Warning& w) {