private string searchForImage(string searchstring) { Google.API.Search.GimageSearchClient ImageSearch = new Google.API.Search.GimageSearchClient("http://google.de"); try { return(ImageSearch.Search(searchstring, 1)[1].VisibleUrl); } catch { return("notfound.png"); } }
public static Bitmap GetImage(string text) { Google.API.Search.GimageSearchClient cl = new Google.API.Search.GimageSearchClient("http://www.rutgers.edu/"); IList <Google.API.Search.IImageResult> imres = cl.Search(text, 1); Image im = DownloadImage(imres[0].TbImage.Url); return(new Bitmap(im)); }