private static int redToEven(int pixel) { // в НЕЧЕТНЫЙ int oldRed = GImage.getRed(pixel); int newRed; if (oldRed % 2 == 1) { // нечетный newRed = oldRed; } else { // если четный newRed = oldRed + 1; } return GImage.createRGBPixel( newRed, GImage.getGreen(pixel), GImage.getBlue(pixel), GImage.getAlpha(pixel)); }