How can we get the image from a webpage using c#

  • Thread starter Thread starter Saish
  • Start date Start date
S

Saish

hi
all
i'm working with a project in which we have to perform operations on a
webpage using c#,
i have a small problem,
i want to geat the image from a webpage and i have to perform operations on
it,
is there any way to solve this problem,
thanking you for hrlping me,
with regards
saish
 
Saish said:
hi
all
i'm working with a project in which we have to perform operations on a
webpage using c#,
i have a small problem,
i want to geat the image from a webpage and i have to perform
operations on it,
is there any way to solve this problem,
thanking you for hrlping me,
with regards
saish

basically the steps would be:
- get the html source of the page (= perform a webrequest for the URL)
- search for the <img> tag, read the "src" argument
- adjust that src, convert relative path to absolute
- perform a second webrequest, now for the img-URL
- now you have the (binary) data of the image

Hans Kesting
 
Back
Top