public static Image saltAndPepper(Image original, double minP, double maxP) {
		if (original == null)
			return null;
		Image saltAndPepper = original.shallowClone();
		for (int x = 0; x < original.getWidth(); x++) {
			for (int y = 0; y < original.getHeight(); y++) {
				double p = Math.random();
				setPixelSaltAndPepper(original, saltAndPepper, minP, maxP, p,
						RED, x, y);
				setPixelSaltAndPepper(original, saltAndPepper, minP, maxP, p,
						GREEN, x, y);
				setPixelSaltAndPepper(original, saltAndPepper, minP, maxP, p,
						BLUE, x, y);
			}
		}
		return saltAndPepper;
	}