home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Blur.fred.pre
- **
- ** $VER: Blur.fred.pre 1.3.0 (5.11.93)
- **
- ** If the Blur.fred script appears in the InvokeADPro list,
- ** this program will ask the user to enter the blur settings for the
- ** Blur operator.
- **
- ** Clips Exported:
- ** FREDCenterWeight - Center weight value
- ** FREDThreshold - Threshold value
- ** FREDTestMode - ~0 if only testing images
- ** 0 if doing actual operation
- **
- ** NOTE: Clip names are case sensitive.
- **
- ** This script requires FRED v1.4.0 (or higher) to run. Also required is
- ** ADPro v2.5.0 (or higher).
- **
- ** Copyright © 1992-1993 ASDG, Incorporated
- ** All Rights Reserved
- */
-
-
- ADDRESS "ADPro"
- OPTIONS RESULTS
-
- PARSE ARG NumberOfCells NumberOfFrames
-
- NL = '0A'X
- SQ = '27'X
- DQ = '22'X
- TRUE = 1
- FALSE = 0
-
-
- /*
- ** Ask the user for the center weight and threshold value.
- */
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Center weight value"' 1 0 16 TRUE
- IF (RESULT = (0-1)) THEN
- EXIT 10
- CenterWeight = RESULT
-
- CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Threshold value"' 0 0 255 TRUE
- IF (RESULT = (0-1)) THEN
- EXIT 10
- Threshold = RESULT
-
-
- /*
- ** Ask the user whether this is a test or the "real thing".
- */
-
- ADPRO_TO_FRONT
-
- OKAYN '"Blur.fred"' '"Modify Image?"' '"Modify|Test|Cancel"'
- IF (RC = 0) THEN DO
- SCREEN_TO_FRONT "FRED"
- EXIT 10
- END
- ELSE
- TestMode = RC - 1
-
- SCREEN_TO_FRONT "FRED"
-
-
- /*
- ** Update the clips.
- */
-
- SETCLIP( "FREDCenterWeight", CenterWeight )
- SETCLIP( "FREDThreshold", Threshold )
- SETCLIP( "FREDTestMode", TestMode )
-
- EXIT 0
-