Learn R Programming

Rvision (version 0.6.0)

write.Image: Image Output

Description

Writes the content of an Image object to a file.

Usage

write.Image(x, file)

Arguments

x

An Image object.

file

A character string naming the path to a file.

Value

A logical indicating whether writing was successful (TRUE) or not (FALSE).

See Also

Image, image

Examples

Run this code
# NOT RUN {
noise <- image(array(sample(0:255, 100 * 100 * 3, replace = TRUE), dim = c(100, 100, 3)))
write.Image(noise, "noise.png")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab