예제 #1
0
 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");
     }
 }
예제 #2
0
        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));
        }