Get Width and Height from the Image Input Stream + Java


  1.   InputStream is = new BufferedInputStream ( fileItem.getInputStream() );  
  2. BufferedImage image = ImageIO.read (is); 
                  width = image.getWidth();       
                  height = image.getHeight();