ELSE {
cmap: ColorTrixMap.Cmap ← ColorTrixMap.Read[];
base: Rope.ROPE ~ FileNames.ResolveRelativePath[name];
table: ColorTrixMod.Table ← NEW[ColorTrixMod.TableRep];
temp: ImagerPixelMap.PixelMap ←
ImagerPixelMap.Create[3, ImagerPixelMap.Window[pm.bw]];
SaveOneFile:
PROC [color: Rope.
ROPE, i:
NAT] ~ {
IO.PutF[cmd.out, "%g . . . ", IO.rope[color]];
ImagerPixelMap.Transfer[temp, pm.bw];
FOR n: NAT IN [0..255) DO table[n] ← cmap[i][n]; ENDLOOP;
ColorTrixMod.Indirect[temp, table];
PixelMapOps.StoreAIS[Rope.Cat[base, "-", color, ".ais"], [temp, FALSE, NIL]];
};
IO.PutRope[cmd.out, "writing "];
SaveOneFile["red", 0];
SaveOneFile["grn", 1];
SaveOneFile["blu", 2];
IO.PutRope[cmd.out, "done!\n"];
};