I'm downloading a photo from url address with the following code:
try(InputStream in = new URL(photoURL).openStream()){
    Files.copy(in, Paths.get("\\outputFiles\\photo.jpg"));
    System.out.println(outputDir+newPhotoURL);
}
But how can I additionaly display width and height of that image?