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

[REBOL] Creating thumbnails [view]

From: Steven::White::ci::bloomington::mn::us at: 22-Apr-2004 15:39

Good Day, Fountain of REBOL Knowledge, The following script reads a big jpeg file and displays it on the screen as a 96x96 thumbnail. When I hit the button, it saves that image to disk as a 96x96 png thumbnail. I mention this to show that the idea can be done (as of course you know). _*_*_* REBOL [ ] view layout [ thumbnail: image 96x96 %ships_1024.jpg button 300x25 "save/png to-image thumbnail" [save/png %shipspng.png to-image thumbnail alert "done"] ] _*__*_ Now, I want to do the same thing, but not in an interactive manner, not with a screen. I want a script that will automatically make a bunch of thumbnails for a bunch of pictures without any human intervention. Can I do that? It seems I can't use the "image" key word outside of a layout. If I use "to-image," I don't see how I can specify the size. I know how to find all the files in a directory, and how to loop through them, etc, but I am missing that piece to read a jpeg file, turn it into a thumbnail, and write it, outside of a VIEW layout. I have looked at the cookbook example "HTML Thumbnail Photo Directory Maker," but that also uses an image within a layout. Thank you. Steven White City of Bloomington 1800 W Old Shakopee Rd Bloomington MN 55431-3096 USA 952-563-4882 (voice) 952-563-4672 (fax) [steven--white--ci--bloomington--mn--us]