[REBOL] Re: Creating [thumbnails] [view]
From: maximo:meteorstudios at: 22-Apr-2004 18:06
use to-image outside of the ui ;-)
here is a complete app which has external path specs, so that you don't have to fiddle
in the code to adapt it to different paths
just change the apps and it will do its magic on the directorie's content.
of course, the directories should be different, otherwise you'll end up with both thumbnails
and source image in the dir, and running the application will duplicate your thumbnails
with interesting filenames ;-)
;----------------------------------------------
rebol []
in-dir: %/d/imgsrc/
out-dir: %/d/imgdest/
imgs: read in-dir
foreach file imgs [
filename: replace copy file %.jpg %_thumbnail.png
in-path: append copy in-dir file
out-path: append copy out-dir filename
save/png out-path to-image layout [
origin 0x0
image 96x96 in-path
]
]
;--------------------------------------------------
-MAx
---
You can either be part of the problem or part of the solution, but in the end, being
part of the problem is much more fun.