I have an image and am wondering how i remove the unnecessary background color in the image.
private Image img;
public Player() {
try {
ImageIcon i = new ImageIcon("imgs/player.png");
this.img = i.getImage();
} catch (Exception e) {
System.out.println("Exception: " + e);
}
}
public void draw(Graphics g) {
g.drawImage(img, 0, 0, null);
}
would it be better to use a bufferedImage or ImageIcon?