So Im a beginner experimenting with ImageIO. Can someone tell me why im getting this pixelated-incomplete sprite?
Here's the code
public BufferedImage getImage(String location)
{
try
{
File file = new File(location);
image = ImageIO.read(file);
}
catch (IOException e)
{
System.err.println("It don't work!!");
e.printStackTrace();
}
return image;
}
And Im using this method to display it
public void paint(Graphics g)
{
g.drawImage(getImage("Numbers/icon0.png"), 0, 0, 32, 32, null);
repaint();
}
THANK YOU IN ADVANCE
