Im trying to adjust the brightness and contrast of an image in Java, ive seen that using RescaleOp is one of the easiest ways of doing this, however, no matter what I change the values to it seems to adjust the brightness and contrast at the same time but I want to adjust them independently. The code I have at the moment is:
RescaleOp rescaleOp = new RescaleOp(0.6f, 1, null); //decrease contrast
rescaleOp.filter(redImage, redImage);
But as I say, its decreasing both, anyone know how to make it so it just adjusts contrast and just adjusts brightness?