Answers for "how do I load a picture in java"

2

java load image

BufferedImage img = null;

try 
{
    img = ImageIO.read(new File("C:/ImageTest/pic2.jpg")); // eventually C:\\ImageTest\\pic2.jpg
} 
catch (IOException e) 
{
    e.printStackTrace();
}
Posted by: Guest on May-25-2020

Code answers related to "how do I load a picture in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language