home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / Converter / AD2.55-C.DMS / in.adf / FREDScripts.lha / FREDOperators / Convolve.fred.pre < prev    next >
Encoding:
Text File  |  1994-01-31  |  1.3 KB  |  65 lines

  1. /*
  2. ** Convolve.fred.pre
  3. **
  4. ** $VER: Convolve.fred.pre 1.1.0 (23.10.93)
  5. **
  6. ** If the Convolve.fred script appears in the InvokeADPro list,
  7. ** this program will ask the user for the name of the convolution
  8. ** matrix to apply to the images.
  9. **
  10. ** Clips Exported:
  11. **    FREDConvolveMatrixFName    -    Full pathname of the matrix.
  12. **    FREDConvolveMix        -    Mix value.
  13. **    FREDConvolveThresh    -    Threshold value.
  14. **
  15. ** NOTE: Clip names are case sensitive.
  16. **
  17. ** This script requires FRED v1.4.0 (or higher) to run.  Also required is
  18. ** ADPro v2.5.0 (or higher).
  19. **
  20. ** Copyright © 1993 ASDG, Incorporated
  21. ** All Rights Reserved
  22. */
  23.  
  24.  
  25. ADDRESS "ADPro"
  26. OPTIONS RESULTS
  27.  
  28. PARSE ARG NumberOfCells NumberOfFrames
  29.  
  30. NL = '0A'X
  31. SQ = '27'X
  32. DQ = '22'X
  33. TRUE  = 1
  34. FALSE = 0
  35.  
  36.  
  37. /*
  38. ** Ask the user which convolution matrix should be used.
  39. */
  40.  
  41. CALL "FREDSCRIPTS:FREDFunctions/GetAFile" '"Select a convolution"' '"ADPRO:Convolutions"' '""""' TRUE
  42. IF (RESULT = DQ||DQ) THEN
  43.     EXIT 10
  44. ELSE
  45.     SETCLIP( "FREDConvolveMatrixFName", RESULT )
  46.  
  47.  
  48. /*
  49. ** Ask for the mix percentage and threshold level.
  50. */
  51.  
  52. CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Mix Percentage"' 100 1 100 TRUE
  53. IF (RESULT = (1-1)) THEN
  54.     EXIT 10
  55. ELSE
  56.     SETCLIP( "FREDConvolveMix", RESULT )
  57.  
  58. CALL "FREDSCRIPTS:FREDFunctions/GetANumber" '"Threshold Level"' 64 0 255 TRUE
  59. IF (RESULT = (0-1)) THEN
  60.     EXIT 10
  61. ELSE
  62.     SETCLIP( "FREDConvolveThresh", RESULT )
  63.  
  64. EXIT 0
  65.