Skip to contents

image_create() can be used to create an Image object with a desired color and size.

Usage

image_create(color, width = 200, heigth = 200, plot = FALSE)

Arguments

color

either a color name (as listed by grDevices::colors()), or a hexadecimal string of the form "#rrggbb".

width, heigth

The width and heigth of the image in pixel units.

plot

Plots the image after creating it? Defaults to FALSE.

Value

An object of class Image.

Examples

image_create("red")
image_create("#009E73", width = 300, heigth = 100)