Hi Sergey

The server sends you the size of the image, so you can use that to
check when the download completed. Also check the way you are reading
the image, you are using IO::readline which is generally used to read
lines of text. Take a look at IO::read to download the image.


-- 
Luis Parravicini
http://ktulu.com.ar/blog/