for (int i = 0; i < mergedImg.getImageHeight(); i++) {
for (int j = 0; j < mergedImg.getImageWidth(); j++) {
lPixel.setARGBValue(leftImg.getARGBValue(j, i));
rPixel.setARGBValue(rightImg.getARGBValue(j, i));
int mr = leftColor.calculateRed(lPixel.r, lPixel.g, lPixel.b) + rightColor.calculateRed(rPixel.r, rPixel.g, rPixel.b);
if (mr < 0)
mr = 0;
else if (mr > 255)
mr = 255;
int mg = leftColor.calculateGreen(lPixel.r, lPixel.g, lPixel.b) + rightColor.calculateGreen(rPixel.r, rPixel.g, rPixel.b);