write.Image: Image Output

View source: R/ImageClass.R

write.ImageR Documentation

Image Output

Description

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.

Author(s)

Simon Garnier, garnier@njit.edu

See Also

Image, image

Examples

## Not run: 
noise <- image(array(sample(0:255, 100 * 100 * 3, replace = TRUE), dim = c(100, 100, 3)))
write.Image(noise, "noise.png")

## End(Not run)


swarm-lab/Rvision documentation built on Feb. 7, 2024, 4:59 a.m.