commands.sh

pnmremap

all

Replace the colors in a PNM image.

More info →

Options (4)

boolean

Replace the colors in an image with those in the specified color palette

Example: pnmremap {{[-ma|-mapfile]}} {{path/to/palette_file.ppm}} {{path/to/input.pnm}} > {{path/to/output.pnm}}
boolean

Use Floyd-Steinberg dithering for representing colors missing in the color palette

Example: pnmremap {{[-ma|-mapfile]}} {{path/to/palette_file.ppm}} {{[-fs|-floyd]}} {{path/to/input.pnm}} > {{path/to/output.pnm}}
boolean

Use the first color in the palette for representing colors missing in the color palette

Example: pnmremap {{[-ma|-mapfile]}} {{path/to/palette_file.ppm}} {{[-fi|-firstisdefault]}} {{path/to/input.pnm}} > {{path/to/output.pnm}}
-mboolean

Use the specified color for representing colors missing in the color palette

Example: pnmremap {{[-ma|-mapfile]}} {{path/to/palette_file.ppm}} {{[-m|-missingcolor]}} {{color}} {{path/to/input.pnm}} > {{path/to/output.pnm}}

Examples (4)

Replace the colors in an image with those in the specified color palette

pnmremap [-ma|-mapfile] path/to/palette_file.ppm path/to/input.pnm > path/to/output.pnm

Use Floyd-Steinberg dithering for representing colors missing in the color palette

pnmremap [-ma|-mapfile] path/to/palette_file.ppm [-fs|-floyd] path/to/input.pnm > path/to/output.pnm

Use the first color in the palette for representing colors missing in the color palette

pnmremap [-ma|-mapfile] path/to/palette_file.ppm [-fi|-firstisdefault] path/to/input.pnm > path/to/output.pnm

Use the specified color for representing colors missing in the color palette

pnmremap [-ma|-mapfile] path/to/palette_file.ppm [-m|-missingcolor] color path/to/input.pnm > path/to/output.pnm
made by @shridhargupta | data from tldr-pages