[code]package test;

import java.awt.Image;
import java.net.URL;

import javax.imageio.ImageIO;

public class Main {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        try {
            URL url = new URL("http://wstatic.naver.com/w9/lg_naver_v3.gif");
            Image image = ImageIO.read(url);
            int width = image.getWidth(null);
            int height = image.getHeight(null);
            System.out.println("width = " + width + ", height = " + height);
           
        } catch (Exception e) {
            System.out.println("파일이 없습니다.");
        }
    }

}
[/code]

 
Posted by 머드초보
,