I have looked at how other people have attempted it like http://introcs.cs.princeton.edu/java/31datatype/Tile.java[2] but have no idea why it works or if " Picture input = new Picture(args[0]);" that part is even part of java api.
I have also looked at the methods such as getSubImage methods and they don't seem to work
This is what I have attempted so far:
public static BufferedImage divide(BufferedImage image) {
int height = image.getHeight() / 2;
int width = image.getWidth() / 2;
BufferedImage tile = image.getSubimage(50, 50, width, height);
return tile;
}
Can anyone help me fix this?