home *** CD-ROM | disk | FTP | other *** search
- /*
- -----------------------------------------------------------------------------
- This AREXX-Script will make any image negative.
-
- 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
- if ~ exists(filename)|filename='' then do
- say 'Unable to find the image !!'
- say 'See Ya...'
- say ''
- exit
- end
-
- options results
- address 'ADPro'
- say 'Negative: 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
-
- /* ---- Let's check if the loaded image is 24Bit ---- */
- /* -------------------------------------------------- */
- IMAGE
- help=ADPRO_RESULT
- dontrender='ok'
- if pos('RENDERED',help)>0|pos('BITPLANE',help)>0 then dontrender='nok'
-
- say 'Converting......'
- operator Negative
- if RC ~= 0 then do
- say 'Unable to select the Negative operator.'
- 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
-
- /* ---- If the loaded image is not 24bit, ---- */
- /* ---- Then adjust palette to colormode ---- */
- /* ---- and render a new image ---- */
- /* ------------------------------------------- */
- if dontrender='nok' then do
- 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
-
- EXECUTE
- if RC~=0 then do
- say 'Execute failed.'
- say 'See Ya......'
- say ''
- exit
- end
- say 'Saving IMAGE 'colors'.....'
- savemode='IMAGE'
- end
- else do
- savemode='RAW'
- say 'Saving RAW.....'
- end
-
- filename=filename'.new'
- SAVE filename savemode
- if RC~=0 then do
- say 'Problems while saving: NOT SAVED.'
- say 'See Ya...'
- end
- say ''
- exit
-