home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / Converter / BB_IENG3.LZX / ImageEngineerV3.0 / ARexx / Vignette.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1996-02-24  |  1.3 KB  |  52 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. 'OPEN IE:alpha/Spherical.alpha 8bit'
  20. alphachannel=result
  21. SCALE alphachannel width height BEST
  22. newalpha=result
  23. CLOSE alphachannel
  24.  
  25. MARK arg(1) PRIMARY
  26. MARK blurredimage SECONDARY
  27. MARK newalpha ALPHA
  28. COMPOSITE 0 0 ALPHA
  29.  
  30. CLOSE newalpha
  31. CLOSE blurredimage
  32.  
  33. exit
  34.  
  35. /*******************************************************************/
  36. /* This is where control goes when an error code is returned by IE */
  37. /* It puts up a message saying what happened and on which line     */
  38. /*******************************************************************/
  39. error:
  40. if RC=5 then do            /* Did the user just cancel us? */
  41.     IE_TO_FRONT
  42.     LAST_ERROR
  43.     'REQUEST "'||RESULT||'"'
  44.     exit
  45. end
  46. else do
  47.     IE_TO_FRONT
  48.     LAST_ERROR
  49.     'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!'
  50.     exit
  51. end
  52.