/* create a "snapshot" version (640w, 60% compression) of all .JPGs in a directory. write to a SNPS subdirectory */ foo=rxfuncquery('sysloadfuncs') if foo=1 then do foo=RxFuncAdd( 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs') if foo=1 then do say "ERROR: could not find RexxUtil.DLL " exit end /* do */ call SysLoadFuncs end foo=rxfuncquery('rexxlibregister') if foo=1 then do foo=rxfuncadd( 'rexxlibregister','rexxlib', 'rexxlibregister') if foo=1 then do say "ERROR: could not find RexxLib.DLL " exit end /* do */ call rexxlibregister end foo=sysfiletree('*.JPG','photos.','FO') adrive=filespec('D',photos.1) dtype=dosfilesys(adrive) if dtype='FAT' then do say "Can not make SNP_ versions of photo on FAT drives " exit end ii=lastpos('\',aphoto) adir=left(aphoto,ii)||'SNPS' if dosisdir(adir)=0 then do say "You must first create a \SNPS subdirectory on: "adir exit end /* do */ do mm=1 to photos.0 if mm//5 ==1 then say "processing image # "mm ' of ' photos.0 aphoto=photos.mm ii=lastpos('\',aphoto) aphoto=left(aphoto,ii)||'SNPS\SNP_'||substr(aphoto,ii+1) oof='@GBMSIZE -a -w 640 '||photos.mm||' '||aphoto||',quality=60 ' oof end