Learn R Programming

qoi (version 0.1.0)

readQOI: Read an QOI image into a RGB(A) raster array

Description

Read an QOI image into a RGB(A) raster array

Usage

readQOI(qoi_image_path)

Value

A matrix with integer (0-255) RGB(A) values with dimensions height x width x channels. Until now 3 (RGB) and 4 (RGBA) channels are integrated in the specification. If the decoding went wrong the returned value is NULL.

Arguments

qoi_image_path

character (required): Path to a stored qoi-image

Author

Johannes Friedrich

Examples

Run this code
## (1) Read RGBA values from file
path <- system.file("extdata", "Rlogo.qoi", package="qoi")
rlogo_qoi <- readQOI(path)
dim(rlogo_qoi)

## (2) plot them
plot.new()

Run the code above in your browser using DataLab