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

본문 바로가기

vb.net

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

회원사진
하나를하더라도최선을
2022-06-26 11:12 5,488 0

본문



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)

댓글목록0

등록된 댓글이 없습니다.
게시판 전체검색