-1

I'll explain what I want to do: let's take this picture as example. I want to download this picture and open it in my application, using Picture Box. I think I'll need to use
Bitmap bitmap = new Bitmap(xxxx); and what should I put at "xxxx" place? Script I saw was written in Delphi an looked like this:

Value := copys (searchPage, '<link rel="image_src" href="', '">');
GetPicture (Value);

Any advice?

PotatoBox
  • 583
  • 2
  • 10
  • 33
  • What did you find when you researched this? It will be easier to help if we know what problems you faced while trying to do this on your own. – Patrick Apr 08 '13 at 19:50
  • @Patrick - I didn't know how to download image and then load it in Picture Box, since I'm a newbie and it's first thing I'm doing on my own. jac - didn't know how to name my problem, so I couldn't find thing you linked. Thanks for help everyone. – PotatoBox Apr 08 '13 at 20:05

1 Answers1

1
Image i = new Image();
BitmapImage src = new BitmapImage();
src.BeginInit();
src.UriSource = new Uri("https://i.stack.imgur.com/glbMA.jpg");
src.EndInit();
i.Source = src;
Ralf de Kleine
  • 11,464
  • 5
  • 45
  • 87