Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] need a thumbnail image quickly?

From: ryan::christiansen::intellisol::com at: 15-May-2001 17:52

If you need to grab an image quick, you can use the following function to search the corbis.com image database and grab the first jpeg thumbnail which matches your search. get-thumbnail: func [ keyword [string!] ][ page: read (make url! rejoin [{http://store.corbis.com/search/productsearch.asp?sc=&search=} keyword {&hidKeywordSearch=&hidSearchCategory=0&pf=&navid=&hidIsNewSearch=TRUE}]) parse page [to {http://cache.corbis.com/Thumb} copy text thru {.jpg} (img-url: make url! copy text)] img: read/binary img-url img-file: make file! (rejoin [keyword {.jpg}]) write/binary img-file img ] In case anyone mixes politics, copyright concerns and bandwidth ethics with programming, you may like to know Corbis.com is owned by Bill Gates. -Ryan