plotwal.rawdata | R Documentation |
Plot raw pixel index data as image.
plotwal.rawdata(raw_data, width, height, apply_palette = wal::pal_q2())
raw_data |
integer vector in containing width * height values in range 0..255, and optionally additional mipmap data at the end (which will be ignored). The raw image data. Can be a Q2 WAL data, Q1 miptex data, or anything else. |
width |
positive integer, the image width. |
height |
positive integer, the image height. |
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 |
## Not run:
# Plot the Q1 shambler skin:
mdl = read.quake.mdl("~/data/q1_pak/progs/shambler.mdl");
plotwal.rawdata(mdl$skins$skin_pic, mdl$header$skin_width,
mdl$header$skin_height, apply_palette = pal_q1());
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.