[Index for tmp_for_tar/imgio]
[Return to Master Index]
writegrayps
(tmp_for_tar/imgio/writegrayps.m)
Function Synopsis
writegrayps(fname, im, dpi)
Help text
writegrayps(fname, im, dpi)
writegrayps Write an image to a graylevel PostScript file.
Image values are scaled to [0,255].
writegrayps(fname, im)
fname - file name.
im - image to write into the file.
dpi - (opt.) - dots per inch at the output device
(default = 300).
See also: writejpg, writegrayjpg, writeppm, writepgm.
Created: 29.8.98.
Version: 1.0
Listing of function file tmp_for_tar/imgio/writegrayps.m
## writegrayps(fname, im, dpi)
##
## Copyright (C) 1998 Ariel Tankus
##
## This program is free software.
## This file is part of the Image Processing Toolbox for Octave
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
## writegrayps Write an image to a graylevel PostScript file.
## Image values are scaled to [0,255].
##
## writegrayps(fname, im)
## fname - file name.
## im - image to write into the file.
## dpi - (opt.) - dots per inch at the output device
## (default = 300).
##
## See also: writejpg, writegrayjpg, writeppm, writepgm.
##
## Author: Ariel Tankus <arielt@math.tau.ac.il>
## Created: 29.8.98.
## Version: 1.0
function writegrayps(fname, im, dpi)
if (nargin < 3)
dpi = 300;
end
command = sprintf('pnmtops -noturn -dpi %d > %s', dpi, fname);
fid = popen(command, 'w');
writepgm(fid, im);
fclose(fid);
endfunction
Produced by oct2html on Sat Sep 14 9:47:03 2002
Cross-Directory links are: ON