write_pgm_r: Write a matrix as a grayscale PGM file without sanity...

Description Usage Arguments Details

View source: R/pgm.R

Description

First pixel is at the top-left of the image, subsequent pixels are filled along a row.

Usage

1
write_pgm_r(image, filename)

Arguments

image

Integer values preferably, but numeric values allowed. Length should be nrow * ncol, but it is up to the caller to check. Values are not checked for the presence of NAs.

filename

Filename to write to. Will be silently overwriten if it already exists.

Details

If values is of type double, then they will be scaled to integers in the range [0,255]

For write_pgm() the caller is expected to have done all sanity checking as the input is not checked for correctness, i.e.


coolbutuseless/mininetpbm documentation built on May 23, 2019, 5:02 a.m.