Skip to contents

Writes the content of an Image object to a file.

Usage

write.Image(x, file, overwrite = FALSE)

Arguments

x

An Image object.

file

A character string naming the path to a file.

overwrite

Should the file be overwritten if it already exists? (default: FALSE)

Value

A message indicating whether writing was successful or not.

Note

The function will guess the format of the output file using the file extension provided by the user.

See also

Author

Simon Garnier, garnier@njit.edu

Examples

if (FALSE) {
noise <- image(array(sample(0:255, 100 * 100 * 3, replace = TRUE), dim = c(100, 100, 3)))
write.Image(noise, "noise.png")
}