Learn R Programming

RImagePalette (version 0.1.1)

display_image: Display color image

Description

Convenience wrapper to create a raster image of the image you wish to extract the palette from.

Usage

display_image(image)

Arguments

image
Matrix The image from which the palette will be extracted from. Should be a 3 (or more) dimensional matrix. The output of functions such as readJPG() are suitable as image.

Value

A raster image in the plot window.

Examples

Run this code
img <- jpeg::readJPEG(system.file("img", "Rlogo.jpg", package="jpeg"))
display_image(img)

Run the code above in your browser using DataLab