home *** CD-ROM | disk | FTP | other *** search
- /*
- -----------------------------------------------------------------------------
- This AREXX-Script will make any image appearable on a (AGA) screen.
- The codes for the screen are written in a doc.
-
- Host address: ADPro (Art Department Professional ®ASDG)
- Written by Jan Van Overbeke, 3-DEE, ©1993.
- Read the AREXX-Scripti doc, for more info about operation and rights!
- -----------------------------------------------------------------------------
- */
-
- arg filename screen
- if ~ exists(filename)|filename='' then do
- say 'Unable to find the image !!'
- say 'See Ya...'
- say ''
- exit
- end
-
- options results
- address 'ADPro'
- say 'ScreenMode: Written by JAN VAN OVERBEKE, 3-DEE, ©1993'
- say 'Image: 'filename
- say 'SAVE: IFF Original Colors.'
- say ''
-
- LFORMAT "UNIVERSAL"
- if RC ~=0 then do
- say 'Unable to select the UNIVERSAL loader.'
- say 'See Ya...'
- say ''
- exit
- end
-
- say 'Loading.........'
- LOAD filename
- if RC ~=0 then do
- say 'Had some problems while loading.'
- say 'See Ya...'
- say ''
- exit
- end
-
- /* ---- Is it 24 bit? ---- */
- /* ---- If it is, quit ---- */
- /* ------------------------ */
- IMAGE
- help=ADPRO_RESULT
- if ~(pos('RENDERED',help)>0|pos('BITPLANE',help)>0) then do
- say "24Bit images can't have a screenmode"
- say 'Except a custom one!'
- say 'See Ya......'
- say ''
- exit
- end
-
- /* ---- Adjust palette ---- */
- /* ------------------------ */
- render_type
- colors=ADPRO_RESULT
- palette=0
- if colors='HAM' then palette=16
- if colors='HAM8' then palette=64
- if palette=0 then palette=colors
- ptotal palette
- pused palette
-
- say 'Converting......'
- SCREEN_TYPE screen
- execute
- if RC ~= 0 then do
- say 'Unable to change SCREEN FORMAT.'
- say 'Wrong argument????'
- say 'See Ya...'
- say ''
- exit
- end
-
- SFORMAT "IFF"
- if RC ~=0 then do
- say 'Unable to select the IFF Saver.'
- say 'See Ya...'
- say ''
- exit
- end
-
- say 'Saving..........'
- filename=filename'.new'
- SAVE filename "IMAGE"
- if RC~=0 then do
- say 'Problems while saving: NOT SAVED.'
- say 'See Ya...'
- end
- say ''
- exit
-