I needed to design solver for puzzle, that is splitted in rectangular tiles (several rows and columns) with:
BufferedImage subImage = image.g