home *** CD-ROM | disk | FTP | other *** search
/ Graphics 16,000 / graphics-16000.iso / amiga / opalvisn / opalbatc.lha / LoadSaveBatch.Rexx next >
OS/2 REXX Batch file  |  1993-03-13  |  3KB  |  110 lines

  1. /* 
  2.                                LoadSaveBatch
  3.                                By J.L. White
  4.                           ⌐1993 Merlin's Software
  5.  
  6.   This Arexx script will allow you to batch convert a series of frames
  7. from IFF to JPEG or visa versa. This script was originally created for
  8. use with Transporter SFC software but has been adapted to run as a script
  9. directly in OpalPaint through the Arexx function keys. Just set the path
  10. in the Arexx control panel for this file.
  11.   LoadSaveBatch requires that you pass it the first frame in the series,
  12. the prefix to save with and how many files to convert. For example, you have
  13. 90 frames of an animation called TEST with the frames named from TEST001
  14. to TEST090. Enter in TEST001 when it ask for the filename. Then it will
  15. ask for a name to save the new files as, which could be something like
  16. DH1:NEWTEST. Next it will ask you how many frames to convert where you 
  17. would enter 90 in this example. You can save the new frames as IFF or JPEG.
  18. The files will then be loaded in either IFF or JPEG one by one then saved.
  19.   I have been busy adding many new OpalVision features to Transporter. 
  20. Version 1.1 allows users of OpalVision to single frame there animations
  21. to Video with most of the popular SFC cards out there. 1.2 will have alot
  22. more Opal support through out the program, like frame grabbing, slide shows,
  23. and Picture In Picture options. If you would like more information on 
  24. Transporter you can contact me at the address below.
  25.  
  26. Jeff White
  27. 809 W. Hollywood St.
  28. Tampa, Fl. 33604
  29. (813) 977-6511
  30.   
  31. */
  32.  
  33. address "OpalPaint_Rexx"
  34. options Results
  35.  
  36. call GetInName
  37. call GetOutName
  38. call GetTotal
  39. call Convert
  40. Okay "Arexx Script Is Complete!"
  41. exit
  42.  
  43.  
  44.  
  45. Convert:
  46.     do FrameNum = 1+AddNUm to TotalFiles+AddNum
  47.         if FrameNum = 1+AddNum then do
  48.             SaveSetUp
  49.                 AskBool "Select Save Format You Wish To Use?\n\n        Select [OK] For IFF \n\n     Select [CANCEL] For JPEG"
  50.             if Result=0 then do
  51.                 AskProp 1 100 84 "Enter JPEG Compression Value (1 - 100)!"
  52.                 Format = JPEG Result
  53.                 end
  54.             else
  55.                 Format = IFF
  56.                 Saver Format
  57.             end
  58.         Load InPic""right(FrameNum,3,'0')
  59.              if RC = 10 then do
  60.             Okay "Arexx Script Aborted!"
  61.             exit
  62.             end
  63.         Save OutPic""right(FrameNum,3,'0')
  64.              if RC = 10 then do
  65.             Okay "Arexx Script Aborted!"
  66.             exit
  67.             end
  68.         if FrameNum = TotalFiles+AddNum then do
  69.             RestoreSetUp
  70.             end
  71.         end
  72. return
  73.  
  74.  
  75.  
  76. GetInName:
  77.     AskFileName "Enter Name Of First Frame" "OpalPaint:Images" ""
  78.     if RC = 5 then do
  79.         Okay "Arexx Script Aborted!"
  80.         exit
  81.         end
  82.     AddNum = right(Result,3)
  83.     Length = wordlength(Result,1)
  84.     InPic = left(Result,Length-3)
  85.         AddNum = AddNum - 1
  86. return
  87.  
  88.  
  89.  
  90. GetOutName:
  91.     AskFileName "Enter Name For Saving Frames" "OpalPaint:Images" ""
  92.     if RC = 5 then do
  93.         Okay "Arexx Script Aborted!"
  94.         exit
  95.         end
  96.     OutPic = Result
  97. return
  98.  
  99.  
  100.  
  101. GetTotal:
  102.     AskProp 1 99 29 "Enter Total Number Of Frames (1-99)!"
  103.     if RC = 5  then do
  104.         Okay "Arexx Script Aborted!"
  105.         exit
  106.         end
  107.     TotalFiles = Result
  108. return
  109.  
  110.