home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 13
/
AACD13.ISO
/
AACD
/
Graphics
/
PPT
/
rexx
/
Components.prx
< prev
next >
Wrap
Text File
|
1998-06-29
|
2KB
|
80 lines
/*
This rexx script will extract the different color components
from an image and puts them into three different frames.
$Id: Components.prx 1.2 1998/06/29 20:51:43 jj Exp jj $
*/
/*-------------------------------------------------------------------*/
/* I suggest you use this header as-is and add your own code below */
OPTIONS RESULTS
SIGNAL ON ERROR
IF ADDRESS() = REXX THEN DO
startedfromcli = 1
ADDRESS PPT
END
ELSE DO
startedfromcli = 0
ADDRESS PPT
END
RESULT = 'no result'
/*-------------------------------------------------------------------*/
/* Modify only below this place */
PARSE ARG framer
IF DATATYPE(framer) ~= NUM THEN DO
RC = 10
RC2 = "No frame selected"
SIGNAL ERROR
END
/*
Determine the name to be used by extracting the necessary
info from the frame.
*/
FRAMEINFO framer STEM inf
newname = inf.name
RENAMEFRAME framer newname || ".RED"
/*
Duplicate the frame twice.
*/
COPYFRAME framer
frameg = RESULT
RENAMEFRAME frameg newname || ".GREEN"
COPYFRAME framer
frameb = RESULT
RENAMEFRAME frameb newname || ".BLUE"
/*
Process.
*/
PROCESS framer 'Extract RED'
PROCESS frameg 'Extract GREEN'
PROCESS frameb 'Extract BLUE'
EXIT
/*-------------------------------------------------------------------*/
/* Again, keep this part intact. This is the error handler. */
ERROR :
returncode = RC
IF startedfromcli = 1 THEN DO
SAY 'ERROR ' returncode ' on line ' SIGL ': ' RC2
PPT_TO_BACK
END
ELSE
SHOWERROR '"'RC2'"' SIGL
EXIT returncode