Hi.

I try to write a programme ,which is used to download imagein some html.

I can get the page content ,and analyse the image url ,but when I download
and save the image using InputStream and ImageIO,there is a problem .It is
the size of image is not right,it seems the image was only a part of the
original,for example,the image in html is 600*800,it is the right size when
save as in IE, but downloaded in my programme,the size is 600*600 ,some data
is miss .I am sure it is not Internet problem.

Below is the code,the output is always N*N(600*600),could you tell me what
the problem is ?

InputStream in = get.getResponseBodyAsStream();
BufferedImage input = ImageIO.read(in);
ImageIcon icon = new ImageIcon(input);
System.out.println(icon.getIconHeight()+"*"+icon.getIconWidth());

Thanks and Regards,

Raymond

Reply via email to