Learn R Programming

rsixel (version 0.0.4)

imgcat: Create SIXEL escape sequence for image file

Description

Create SIXEL escape sequence for image file. jpeg, png or magick packages are required to read image files. Image with alpha channel will be blended with the specified background color.

Usage

imgcat(
  path,
  ...,
  max.colors = 256,
  iter.max = 10,
  background = "white",
  file = ""
)

Value

None (invisible 'NULL').

Arguments

path

character, path to a image file.

...

other positional arguments will be omitted.

max.colors

integer, max colors of the palette. The maximum is 256. This parameter will be passed to sixelEncode.

iter.max

integer, maximum number of iterations for k-means clustering. This parameter will be passed to sixelEncode.

background

character, background color to blend with for pixel with transparency. Default is "white".

file

A connection, or a character string naming the file to print to. This parameter will be passed to cat

Examples

Run this code
imgcat(system.file("img", "Rlogo.jpg", package="jpeg"))

Run the code above in your browser using DataLab