i have an tile map that i wanted to grab a specific tile from. Is there a way to grab only a section of an Image?
5 replies to this topic
#1
Posted 06 July 2011 - 02:06 PM
|
|
|
#2
Posted 06 July 2011 - 02:23 PM
The BufferedImage class has a method called "subImage" that returns a new BufferedImage from the selected region.
BufferedImage (Java Platform SE 6)
BufferedImage (Java Platform SE 6)
#3
Posted 06 July 2011 - 04:40 PM
awesome! do you know how to load a picture to the BufferedImage?
#4
Posted 06 July 2011 - 07:00 PM
Using ImageIO ImageIO (Java Platform SE 6)
BufferedImage sprite = ImageIO.read( new File("directory/of/file/spriteSheet.png") );
#5
Posted 12 July 2011 - 07:59 AM
alright. would it be best to use a tilesheet and to grab subimages off it or would it be best to just individually create each tile?
#6
Posted 12 July 2011 - 02:51 PM
zapdude1234 said:
alright. would it be best to use a tilesheet and to grab subimages off it or would it be best to just individually create each tile?
It's probably more efficient to use sub images, but I enjoy/find it easier creating individual images.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









