map_color_replace - Map and rearrange pixels and pallette entries in map image
map_color_replace <command> <options> <bmp_file>
Command:
Options:
Format of mapping file:
RRGGBB=>RRGGBBWhere RR, GG, BB - hexadecimal representation of corresponding color. Several mapping can be specified in single file. Lines starting with '#' are comments. For -c mode, both source and target color must exist in image. For -p mode, source color must exist in image.
World.map: 05819f=>00809e map_color_replace -c --mapfile=World.map World-in.bmp --outfile=World-out.bmp
After this command, image will no longer contain pixels whose color is 05819f. (There still will be pallette entry for that color though. To reclaim it, image should be converted (by third-party tool, e.g. graphics editor) to RGB mode and then back to palletized mode).
sample.map: 00FF00=>00c000 map_color_replace -p --mapfile=Sample.map sample-in.bmp --outfile=sample-out.bmp
After this command, bright green color will be turned into dimmer green.
map_color_replace -g --map=auto World-in.bmp --outfile=World.bmp
After this command, color cut of image will remain unchanged, but grayscale cut will become optimized (naturally looking) for grayscale devices.
map_color_replace -p --pallette=gray --pallette=reverse World-in.bmp --outfile=World-bad.bmp
map_color_replace -g --map=auto --pallette=gray --pallette=reverse World-in.bmp --outfile=World-preview.bmp