read.pgm(file) write.pgm(pgmobj, file="Rimage.pgm", forceplain=FALSE) plot(pgmobj, xlab=NULL, ylab=NULL, axes=FALSE, ...)
pgmobj
|
an object of class pgm
|
file
| name of the pgm file |
forceplain
|
If TRUE , an ASCII pgm file is written. Default
is to write a binary (raw) pgm file.
|
read.pgm
reads a pgm file and loads the image into an
object of class pgm
, which is basically a
matrix. write.pgm
writes an object of class pgm
to a
file.
plot.pgm
plots a pgm object using the command
image
. The only difference is that the element [1,1]
of
pgmobj
is plotted as the upper left corner (plain
image
would plot [1,1]
as the lower left corner.
read.pgm
returns an object of class pgm
. The maximum
gray value (corresponding to the color black) is stored as attribute
"maxval"
).image