본문 바로가기
카테고리 없음

[vb.net] URL 이미지 Image 변환 및 저장

by IT HUB 2022. 6. 26.
728x90
반응형
Dim URL As String = "http://program1472.com/data/common/6e78fa096f9750e12db6.png"
Dim img As Image = System.Drawing.Image.FromStream(Net.WebRequest.Create(URL).GetResponse().GetResponseStream())
img.Save(APP_PRODUCT_PATH & "\test.png", Imaging.ImageFormat.Png)
 
또는
 
Dim URL As String = "http://program1472.com/data/common/6e78fa096f9750e12db6.png"
Dim img As Image = Bitmap.FromStream(New IO.MemoryStream(DirectCast(New Net.WebClient, Net.WebClient).DownloadData(URL)))
img.Save(APP_PRODUCT_PATH & "\test.png", Imaging.ImageFormat.Png)

반응형

댓글