I’ve been researching the BufferedImage class to use for game programming purposes (so that I can make image maps for levels and use getRGB() to identify the tile in each pixel), but I’m very confused about how to actually make a BufferedImage. What’s got me particularly confused is how you can’t make a BufferedImage using an Image as a parameter. Step by step, how does one instantiate a BufferedImage for a simple image file (e.g. a .jpg)?
I’ve been researching the BufferedImage class to use for game programming purposes (so that
Share
Simple steps –
ImageIO.read(File file)as shown in the documentation