img.to.wal | R Documentation |
Convert an input RGB image to a WAL instance, re-mapping its colors to the WAL palette in the process and generating the mipmaps.
img.to.wal(in_image, apply_palette = wal::pal_q2(), wal = wal.template())
in_image |
numeric matrix with 3 dimensions: widt, height, channels. Values must be in range 0..1. This is the image format returned by |
apply_palette |
n x 3 integer matrix, the palette for the WAL image. This is not saved to the wal image, but still required because the colors from the |
wal |
a wal instance. Note that 1 will be substracted from the data when it is written, as indices are stored 0-based in the file. |
wal instance
## Not run:
wal = img.to.wal(jpeg::readJPEG("~/mytex.jpg"));
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.