Does anyone know how to make only the non-transparent part of an image bright or dark ? I tried the following code but it appears that rescalOp applies to every pixel of an image , non-transparent as well as transparent:
public static BufferedImage brightImage(BufferedImage bufferedImage)
{
BufferedImage bi;
float scaleFactor = 1.2f;
RescaleOp op = new RescaleOp(scaleFactor, 1, null);
bi = op.filter(bufferedImage, null);
return(bi);
}
Jay