在线得到图片的宽高 BufferedImage bimg = ImageIO.read(new URL("http://rushiwork.oss-cn-beijing.aliyuncs.com/works/wechat/202003/b1kozwrushi.net.jpeg")); System.out.println(bimg.getWidth()+"==="+bimg.getHeight());