private static void setPixelSaltAndPepper(Image original,
			Image saltAndPepper, double minP, double maxP, double p,
			ChannelType color, int x, int y) {
		double pix;
		if (p < minP) {
			pix = 0;
		} else if (p > maxP) {
			pix = Image.MAX_VAL;
		} else {
			pix = original.getPixel(x, y, color);
		}
		saltAndPepper.setPixel(x, y, color, pix);
	}