readWAL: Read bitmap image in WAL format, returning image data only.

View source: R/read_wal.R

readWALR Documentation

Read bitmap image in WAL format, returning image data only.

Description

Read a bitmap image in WAL format, and return data in the same format as png::readPNG and jpeg::readJPEG do.

Usage

readWAL(filepath, apply_palette = wal::pal_q2())

Arguments

filepath

character string, path to the file including extension

apply_palette

optional 256 x 3 integer matrix, the palette. Must contain values in range 0..255. Pass NULL if you do not want to apply any palette. The resulting wal object will not have an 'image' entry then.

Value

numeric matrix with dimension width x height x channels, with all color values in range 0..1.

See Also

read.wal if you want to read the header and have more control.

Examples

## Not run: 
   walf = '~/data/q2_pak0_extracted/textures/e1u2/basic1_7.wal';
   wal_image = readWAL(walf);
   dim(wal_image);

## End(Not run)


dfsp-spirit/wal documentation built on Feb. 5, 2024, 1:59 p.m.