Hi again. I am trying to make code that set all black pixels to white. But my code does nothing. Why is that?
package net.viped;
import java.awt.image.BufferedImage;
public class ImageManipulation {
public ImageManipulation() {
}
public BufferedImage setTransparent(BufferedImage image) {
for (int x = 0; x < image.getWidth(); x++) {
for (int y = 0; y < image.getHeight(); y++) {
if (image.getRGB(x, y) == (0x000000)) {
System.out.println("This never shows up");
image.setRGB(x, y, 0xffffff);
}
}
} return image;
}
}