Loading IMAGES

So I know how to load images via imageicons and that is working fine but i want to make 1 image and cut the tiles out
and make new images out of them sorta like minecarft did
my image : http://i.imgur.com/hQpUDxH.png?1
anyone ? BTW i have made a image loading class
[spoiler]


package game;

import java.awt.Image;

import javax.swing.ImageIcon;

public class ImageLoader {
	
	public static Image player = loadImage("img/player.png");
	
	public static Image loadImage(String url) {
		Image img = null;
		ImageIcon i = new ImageIcon(url);
		img = i.getImage();
		if (img != null) {
			return img;
		} else {
			System.out.println("ERROR 1");
			return null;
		}

	}
}

[/spoiler]

PLEASE HELP !!!

Create a new Image (either using a BufferedImage constructor or a createCompatibleImage method), get a graphics object to draw onto it, and draw the larger image at a suitable offset.

This is how I get my tiles from my sets:


	public static ArrayList<BufferedImage> loadTileSet(String setName){
		ArrayList<BufferedImage> tileset = new ArrayList<>();
		try {
			BufferedImage bildTileset = ImageIO.read(new File("resources/images/"+setName+".gif"));
			int width = bildTileset.getWidth()/32;
			int height = bildTileset.getHeight()/32;
			for(int x=0; x<height;x++){
				for(int y=0; y<width; y++){
					BufferedImage tile = bildTileset.getSubimage(y*32, x*32, 32, 32);
					tileset.add(tile);
				}
			}
		} catch (IOException error) {
			System.err.println("Tileset not found");
			error.printStackTrace();
		}
		
		return tileset;
	}

You will get a list of 32x32 tiles, but it will cut your tree into 4 parts :-\

thanks sooo much :smiley: :smiley: :smiley: