home *** CD-ROM | disk | FTP | other *** search
- /* Program to run the PhotoCD converter from Xetec and load the resulting file */
- /* $VER: PCDconvert July 94 */
- call open("STDERR","ram:trace","W")
- trace r
-
-
- options results
- address "ADPro"
-
- lformat "UNIVERSAL"
- sformat "IFF"
-
- render_type
- colours = ADPro_result
- screen_type
- stype = ADPro_result
- gamma
- gammasetting = ADPro_result
-
- getfile '"Select file ..."' "CD0:"
- if rc~=0 then do
- okay1 "No file selected"
- exit
- end
-
- filename = ADPro_result
-
- getdir '"Select directory for temp file"'
- if rc=10 then exit
- directory = ADPro_Result
- filestring = "/temp.photo.24bit"
- if right(directory,1)=":" then filestring = "temp.photo.24bit"
- tempfile = directory||filestring
-
- getnumber '"Set quality level"' 3 1 4
- if rc=10 then exit
- level=ADPRO_RESULT
-
- address command
- delete '"'tempfile'"'
-
- "PCDtoIFF -"level '"'filename'"' '"'tempfile'"'
-
- address "ADPro"
- PAUSE 750
- waits=6 /* arbitrary timeout */
- if ~exists(tempfile) then do /* frame not yet ready */
- j = 0
- do k = 1 to waits*10 /* ultimate timeout */
- PAUSE 750 /* 15 secs */
- if exists(tempfile) then leave k
- j=j+1
- if j = waits then do
- OKAYN '"Failure"' '"File from PCDtoIFF has not appeared"' '"Give up|Wait a bit longer"'
- if rc~=0 then exit
- else j = 1
- end
- end
-
- end
-
- load "'"tempfile"'"
- execute
- ADPRO_DISPLAY
- exit
- end
-
-