for (int y1 = 0; y1 < height / 2; y1++){ y2 = height - y1 - 1; convertARGBtoABGR(pixelData, y1 * width, sln, 0, width); convertARGBtoABGR(pixelData, y2 * width, pixelData, y1 * width, width); System.arraycopy (sln, 0, pixelData, y2 * width, width); convertARGBtoABGR(pixelData, 0, pixelData, 0, pixelData.length);