/* * ImageFX Browser Script * * All browser scripts are called as follows: * * ScriptName.browse * * Where: * * = Number of files selected (could be 0). * = File containing the list of files selected, * one file per line, with full pathname. * * ConvertToJPEG.browse: * * Convert selected files to JPEG. * */ OPTIONS RESULTS PARSE ARG numfiles filelist . IF numfiles > 0 THEN DO IF OPEN(infile, filelist, 'Read') THEN DO DO WHILE ~EOF(infile) curfile = READLN(infile) IF curfile ~= "" THEN DO LoadBuffer '"'curfile'"' FORCE IF rc = 0 THEN SaveBufferAs JPEG '"'curfile'.JPG"' QUALITY 90 END END CALL CLOSE(infile) KillBuffer FORCE END EXIT 0