home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / gfx / edit / imageengineer / arexx / vignette.rexx < prev    next >
OS/2 REXX Batch file  |  1995-04-11  |  1KB  |  53 lines

  1. /**************************************************/
  2. /* Image Engineer script                          */
  3. /* by Simon Edwards                               */
  4. /* Applies a blurred Vignette effect to an image. */
  5. /**************************************************/
  6.  
  7. Options results
  8. signal on error            /* Setup a place for errors to go */
  9.  
  10. if arg()==0 then exit
  11.  
  12. LOWPASS arg(1) 7 7
  13. blurredimage=result
  14. PROJECT_INFO arg(1) Width
  15. width=result
  16. PROJECT_INFO arg(1) Height
  17. height=result
  18.  
  19. TYPE 8BIT
  20. 'OPEN IE:alpha/Spherical.alpha'
  21. alphachannel=result
  22. SCALE alphachannel width height BEST
  23. newalpha=result
  24. CLOSE alphachannel
  25.  
  26. MARK arg(1) PRIMARY
  27. MARK blurredimage SECONDARY
  28. MARK newalpha ALPHA
  29. COMPOSITE 0 0 ALPHA
  30.  
  31. CLOSE newalpha
  32. CLOSE blurredimage
  33.  
  34. exit
  35.  
  36. /*******************************************************************/
  37. /* This is where control goes when an error code is returned by IE */
  38. /* It puts up a message saying what happened and on which line     */
  39. /*******************************************************************/
  40. error:
  41. if RC=5 then do            /* Did the user just cancel us? */
  42.     IE_TO_FRONT
  43.     LAST_ERROR
  44.     'REQUEST "'||RESULT||'"'
  45.     exit
  46. end
  47. else do
  48.     IE_TO_FRONT
  49.     LAST_ERROR
  50.     'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!'
  51.     exit
  52. end
  53.