home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / prog / arexx / scripti.lha / 3-DEE / Scripti / General / SaveFormat.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1993-05-19  |  1.6 KB  |  74 lines

  1. /*
  2. -----------------------------------------------------------------------------
  3. This AREXX-Script will save any image, the save-format must be specified
  4.       in the argument by the user.
  5.  
  6. Host address: ADPro (Art Department Professional   ®ASDG)
  7. Written by Jan Van Overbeke, 3-DEE, ©1993.
  8. Read the AREXX-Scripti doc, for more info about operation and rights!
  9. -----------------------------------------------------------------------------
  10. */
  11.  
  12. parse arg filename saver
  13. if ~ exists(filename)|filename='' then do
  14.     say 'Unable to find the image !!'
  15.     say 'See Ya...'
  16.     say ''
  17.     exit
  18.     end
  19.  
  20. address 'ADPro'
  21. SFORMAT saver
  22. if RC~=0 then do
  23.     say 'Unable to select the saver!!!'
  24.     say '    ->Wrong Argument?'
  25.     say 'See Ya......'
  26.     say ''
  27.     exit
  28.     end
  29.  
  30. /* ---- If you use another format, adjust your prefs! ---- */
  31. /* ----        Or more important: add your own!       ---- */
  32. /* ------------------------------------------------------- */
  33. savemode='IMAGE'
  34. if saver='JPEG' then savemode='RAW'
  35.  
  36. say 'SaveFormat: Written by JAN VAN OVERBEKE, 3-DEE, ©1993'
  37. say 'Image: 'filename
  38. say 'Save Format: 'saver
  39. say ''
  40.  
  41. LFORMAT "UNIVERSAL"
  42. if RC ~=0 then do
  43.     say 'Unable to select the UNIVERSAL loader.'
  44.     say 'See Ya...'
  45.     say ''
  46.     exit
  47.     end
  48.  
  49. say 'Loading.........'
  50. LOAD filename
  51. if RC ~=0 then do
  52.     say 'Had some problems while loading.'
  53.     say 'See Ya...'
  54.     say ''
  55.     exit
  56.     end
  57.  
  58. say 'Saving........'
  59. filename=filename'.new'
  60. SAVE filename savemode
  61. if RC~=0 then do
  62.     say 'Problems while saving: NOT SAVED.'
  63.     say 'See Ya...'
  64.     say ''
  65.     end
  66.  
  67. SFORMAT 'IFF'
  68. if RC~=0 then do
  69.     say 'Unable to switch to IFF saver.'
  70.     say 'See Ya.....'
  71.     end
  72. say ''
  73. exit
  74.