.TH REMAP 9.1
.SH NAME
cmap, remap \- map colors
.SH SYNOPSIS
.B fb/cmap
.I colormap
[
.I input
]
.PP
.B fb/remap
.I colormap
[
.I input
]
.SH DESCRIPTION
.I Cmap
looks up the
.B rgb
channels of the input picture file (default standard input), in the
.IR colormap ,
writing the resulting
.B rgb
image to standard output.
That is,
.I cmap
writes on its output the result of applying the colormap to the pixels of the input image.
.PP
.I Remap
is approximately the inverse of
.IR cmap .
Pixel values in the input image are replaced by those that, when mapped through
the input
.IR colormap ,
come closest to reproducing the
.I input
image.
The output picture includes a copy of the
.IR colormap .
.SH SOURCE
.B /sys/src/fb/cmap.c
.br
.B /sys/src/fb/remap.c
.SH "SEE ALSO
.IR picfile (9.6)
.SH BUGS
Both commands work only if the input image contains
.B rgb
channels.
