java 读取网络图片的大小(宽+高)

InputStream is = new URL("http://ruanliecache.rydigital.com/rt0/rs640x538/fy/uploads/2013/04/1146.jpg").openStream();
           
        	BufferedImage sourceImg =ImageIO.read(is);   
//           // System.out.println(String.format("%.1f",picture.length()/1024.0));  
            System.out.println(sourceImg.getWidth());  
            System.out.println(sourceImg.getHeight());  


你可能感兴趣的:(java 读取网络图片的大小(宽+高))