writeQOI {qoi} | R Documentation |
Write an QOI image from an RGB(A) raster array or matrix
Description
Write an QOI image from an RGB(A) raster array or matrix
Usage
writeQOI(image, target = raw())
Arguments
image |
matrix (required): Image represented by a integer matrix or array with values in the range of 0 to 255. |
target |
character or connections or raw: Either name of the file to write, a binary connection or a raw vector (raw() - the default - is good enough) indicating that the output should be a raw vector. |
Value
The result is either stored in a file (if target is a file name), in a raw vector (if target is a raw vector) or sent to a binary connection.
Author(s)
Johannes Friedrich
Examples
## (1) Write to raw() -> see bytes
bin <- writeQOI(Rlogo_RGBA)
rawToChar(head(bin)) ## qoif
## Not run:
## (2) Write to a *.qoi file
writeQOI(Rlogo_RGBA, "Rlogo_RGBA.qoi")
## End(Not run)
[Package qoi version 0.1.0 Index]