Mercurial > hg > octave-lyh
diff scripts/image/saveimage.m @ 3373:36405da8e173
[project @ 1999-11-23 20:54:17 by jwe]
author | jwe |
---|---|
date | Tue, 23 Nov 1999 20:54:31 +0000 |
parents | eb27ea9b7ff8 |
children | 4d54a9036f21 |
line wrap: on
line diff
--- a/scripts/image/saveimage.m +++ b/scripts/image/saveimage.m @@ -17,30 +17,32 @@ ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -## Save a matrix to disk in image format. -## -## saveimage (filename, x) saves matrix x to file filename in octave's -## image format. The current colormap is saved in the file also. -## -## saveimage (filename, x, "img") saves the image in the default format -## and is the same as saveimage (filename, x). -## -## saveimage (filename, x, "ppm") saves the image in ppm format instead -## of the default octave image format. -## -## saveimage (filename, x, "ps") saves the image in PostScript format -## instead of the default octave image format. (Note: images saved in -## PostScript format can not be read back into octave with loadimage.) -## -## saveimage (filename, x, format, map) saves the image along with the -## specified colormap in the specified format. -## -## Note: If the colormap contains only two entries and these entries -## are black and white, the bitmap ppm and PostScript formats are used. -## If the image is a gray scale image (the entries within each row of -## the colormap are equal) the gray scale ppm and PostScript image -## formats are used, otherwise the full color formats are used. -## +## @deftypefn {Function File} {} saveimage (@var{file}, @var{x}, @var{fmt}, @var{map}) +## Save the matrix @var{x} to @var{file} in image format @var{fmt}. Valid +## values for @var{fmt} are +## +## @table @code +## @item "img" +## Octave's image format. The current colormap is also saved in the file. +## +## @item "ppm" +## Portable pixmap format. +## +## @item "ps" +## PostScript format. Note that images saved in PostScript format can not +## be read back into Octave with loadimage. +## @end table +## +## If the fourth argument is supplied, the specified colormap will also be +## saved along with the image. +## +## Note: if the colormap contains only two entries and these entries are +## black and white, the bitmap ppm and PostScript formats are used. If the +## image is a gray scale image (the entries within each row of the colormap +## are equal) the gray scale ppm and PostScript image formats are used, +## otherwise the full color formats are used. +## @end deftypefn + ## The conversion to PostScript is based on pbmtolps.c, which was ## written by ## @@ -49,7 +51,7 @@ ## University of British Columbia ## ## and is part of the portable bitmap utilities, -## + ## SEE ALSO: loadimage, save, load, colormap ## Author: Tony Richardson <arichard@stark.cc.oh.us>