You need to used the BufferedImage class and the ImageIO class. I have done this recently within the confines of the Blackbord Learn platform. I hope this code snippet helps you out:
Note that the imgSrc variable has been set accordingly earlier in my application. Have look over the Java API for:
java.io.*
java.net.*
java.awt.image. BufferedImage
javax.imageio
Comment