Learn R Programming

screenshot (version 0.9.2)

save_bmp: Save an image as a BMP file

Description

Save an image as a BMP file

Usage

save_bmp(image_data, path)

Value

Saves the image as a BMP file at the specified path.

Arguments

image_data

A raster image data object, such as an array of pixel values or an R object representing an image.

path

The path to the file to be saved.

Examples

Run this code
if (FALSE) {
# Create an image data object
image_data <- matrix(rnorm(100), ncol = 10)
# Save the image as a BMP file
save_bmp(image_data, "image.bmp")
}

Run the code above in your browser using DataLab