home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / ADPro251-3.DMS / ADPro251-3.adf / FREDScripts.lha / FREDOperators / Blur.fred.pre < prev    next >
Encoding:
Text File  |  1994-01-31  |  1.4 KB  |  79 lines

  1. /*
  2. ** Blur.fred.pre
  3. **
  4. ** $VER: Blur.fred.pre 1.3.0 (5.11.93)
  5. **
  6. ** If the Blur.fred script appears in the InvokeADPro list,
  7. ** this program will ask the user to enter the blur settings for the
  8. ** Blur operator.
  9. **
  10. ** Clips Exported:
  11. **    FREDCenterWeight    -    Center weight value
  12. **    FREDThreshold        -    Threshold value
  13. **    FREDTestMode        -    ~0 if only testing images
  14. **                    0 if doing actual operation
  15. **
  16. ** NOTE: Clip names are case sensitive.
  17. **
  18. ** This script requires FRED v1.4.0 (or higher) to run.  Also required is
  19. ** ADPro v2.5.0 (or higher).
  20. **
  21. ** Copyright © 1992-1993 ASDG, Incorporated
  22. ** All Rights Reserved
  23. */
  24.  
  25.  
  26. ADDRESS "ADPro"
  27. OPTIONS RESULTS
  28.  
  29. PARSE ARG NumberOfCells NumberOfFrames
  30.  
  31. NL = '0A'X
  32. SQ = '27'X
  33. DQ = '22'X
  34. TRUE = 1
  35. FALSE = 0
  36.  
  37.  
  38. /*
  39. ** Ask the user for the center weight and threshold value.
  40. */
  41.  
  42. CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Center weight value"' 1 0 16 TRUE
  43. IF (RESULT = (0-1)) THEN
  44.     EXIT 10
  45. CenterWeight = RESULT
  46.  
  47. CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Threshold value"' 0 0 255 TRUE
  48. IF (RESULT = (0-1)) THEN
  49.     EXIT 10
  50. Threshold = RESULT
  51.  
  52.  
  53. /*
  54. ** Ask the user whether this is a test or the "real thing".
  55. */
  56.  
  57. ADPRO_TO_FRONT
  58.  
  59. OKAYN '"Blur.fred"' '"Modify Image?"' '"Modify|Test|Cancel"'
  60. IF (RC = 0) THEN DO
  61.     SCREEN_TO_FRONT "FRED"
  62.     EXIT 10
  63. END
  64. ELSE
  65.     TestMode = RC - 1
  66.  
  67. SCREEN_TO_FRONT "FRED"
  68.  
  69.  
  70. /*
  71. ** Update the clips.
  72. */
  73.  
  74. SETCLIP( "FREDCenterWeight", CenterWeight )
  75. SETCLIP( "FREDThreshold", Threshold )
  76. SETCLIP( "FREDTestMode", TestMode )
  77.  
  78. EXIT 0
  79.