home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 94 / af094sub.adf / Vid6.LZX / video6-drivers / arexx / WBHam6.ifx < prev    next >
Text File  |  1995-01-14  |  1KB  |  37 lines

  1. /*
  2.  * $VER: MapToWB 1.00.00 (24.9.92)
  3.  *
  4.  * Arexx program for the ImageFX image processing system.
  5.  * Written by Thomas Krehbiel
  6.  *
  7.  * Render the current image such that it can be displayed on a
  8.  * standard 4-color 640x200 Workbench screen.
  9.  *
  10.  */
  11.  
  12. OPTIONS RESULTS
  13.  
  14. GetMain ; IF result = "" THEN EXIT     /* make sure we have a buffer */
  15.  
  16. RequestFile '"Output Image Name..."'   /* Get filename from user */
  17. IF rc ~= 0 THEN EXIT                   /* Cancelled... */
  18. output = result
  19.  
  20. SaveUndo ; Undo Off ; Redraw Off       /* Save undo buffer, then turn it off */
  21.  
  22.                                        /* Scale image to 640x200 */
  23.  
  24. Palette Rend                           /* Select render palette */
  25. GrabPalette Workbench                  /* Grab workbench screen colors */
  26. SetRange 8 0 15                         /* Make range 8 the first four colors */
  27. LockRange 8 On                         /* Lock the first four colors */
  28.  
  29. Render Go                              /* Render the image */
  30. SaveRenderedAs ILBM output
  31. Render Close                           /* Close render screen */
  32.  
  33. Undo On ; Undo Quiet ; Redraw On       /* Restore original image */
  34.  
  35. EXIT                                   /* All done */
  36.  
  37.