Learn R Programming

rsixel (version 0.0.4)

sixelEncode: Create SIXEL escape sequence from image data

Description

Create SIXEL escape sequence from image data. Quantization is done by k-means clustering.

Usage

sixelEncode(image, max.colors = 256, iter.max = 10)

Value

SIXEL escape sequence

Arguments

image

a three dimensional RGB array with values ranging from 0 to 1.

max.colors

integer, max colors of the palette. The maximum is 256. Default is 256.

iter.max

integer, maximum number of iterations for k-means clustering.

Examples

Run this code
img <- png::readPNG(system.file("img", "Rlogo.png", package="png"))
cat(sixelEncode(img, 4))

Run the code above in your browser using DataLab