For this you need the Java 2D API. Here's a Sun tutorial about the subject. In the chapter Working with Images, you can learn how to read / download an image. Here is an excerpt from the textbook:
BufferedImage img = null; try { img = ImageIO.read(new File("strawberry.jpg")); } catch (IOException e) { }
source share