Java getSubimage() outside of raster
问题 I'm trying to take an image and store it in an array of 16x16 subimages. The image I am using is 512x512 pixels. However, while iterating through the loop, getSubimage() is stopped by a Raster exception. Here is the code: public class TileList extends JPanel { private static final int width = 16; //width of a tile private static final int height = width; private int col = 1; private int row = 1; private BufferedImage image; File tilesetImage = new File("image.png"); BufferedImage tileset[];