read.pcx: Read bitmap file in PCX format.

Description Usage Arguments Value Examples

View source: R/read_pcx.R

Description

Read bitmap file in PCX format.

Usage

1
read.pcx(filepath, hdr = TRUE, hdr_only = FALSE)

Arguments

filepath

character string, path to the file including extension

hdr

logical, whether to return full list with header

hdr_only

logical, whether to read only the header

Value

array with color data, or pcx instance (named list) if 'hdr' is 'TRUE'

Examples

1
2
3
4
5
6
7
8
## Not run: 
   pcxf = '~/data/q2_pak0_extracted/models/items/quaddama/skin.pcx';
   pcx = read.pcx(pcxf);
   plot(imager::as.cimg(pcx$colors));
   # show palette:
   plot(1:256, col=rgb(pcx$palette, maxColorValue = 255));

## End(Not run)

dfsp-spirit/pcx documentation built on Nov. 24, 2021, 5:29 p.m.