Tuesday, May 01, 2007

rescale image

When reducing the size of an image, one often does not want fine detail to get blended away into the background. Therefore, a tool like NetPbm pnmscale should take as input one or more background colors, and one or more foreground colors. When (say) averaging four pixels into one for a 50% linear reduction, background pixels do not count in the average, unless all the pixels are background. If a fourground pixel appears, no other pixels count in the average.

No comments :