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