BufferedImage bufferedImage = ImageIO.read(file.getInputStream());
    int width = bufferedImage.getWidth();
    int height = bufferedImage.getHeight();

 

 

복사했습니다!