Dim myWebClient As New WebClient()
Dim strThumb As New Uri("http://www.somesite.com/image.jpg")
Using stream As Stream = myWebClient.OpenRead(strThumb)
Using bitmap As New System.Drawing.Bitmap(stream)
'flush and close the stream
stream.Flush()
stream.Close()
bitmap.Save(AppDomain.CurrentDomain.BaseDirectory + "Cache\test.jpg")
End Using
End Using
No comments:
Post a Comment