home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 20
/
AACD20.BIN
/
AACD
/
Graphics
/
PerfectPaint
/
rexx
/
general
/
MkQT.rx
< prev
next >
Wrap
Text File
|
2000-10-31
|
3KB
|
150 lines
/* arexx Script
Save QuickTime Movie
You need "Jpeg2mov" in PerfectPaint:Tools/
*/
options results
parse ARG Port b
ADDRESS value Port
pp_AvoidRefresh
pp_GetDepth
D=result
IF D<24 then DO
pp_Warn 'This*script*is*only|for*24bits*Picture.'
pp_PermitRefresh
Exit
END
pp_CountFrames
count=result
IF count<2 then DO
pp_Warn 'Make*an*Anim*first.'
pp_PermitRefresh
EXIT
END
JPEGQ=100
JPEGS=0
JPEGC=0
FPS=25
file="ram:Anim.mov"
if EXISTS('PerfectPaint:Prefs/Rexx_Prefs/MkQT') THEN DO
IF OPEN('lfile','PerfectPaint:Prefs/Rexx_Prefs/MkQT', "R") then DO
file = READLN('lfile')
JPEGQ=READLN('lfile')
JPEGS=READLN('lfile')
JPEGC=READLN('lfile')
FPS=READLN('lfile')
CALL CLOSE('lfile')
file2=""
do i=1 to LENGTH(file)
a=SUBSTR(file,i,1)
if a=" " then DO
a="*"
END
file2=file2||a
END
file=file2
END
END
pp_DialogInit 250 160 "*SAVE*QuickTime*Movie*" 6
pp_String 0 50 12 150 16 "Name" 1 100 file
n=LASTPOS('/',file)
if n=0 then DO
n=LASTPOS(':',file)
file=SUBSTR(file,1,n)
END
else DO
file=SUBSTR(file,1,n)
END
pp_Getfile 1 205 13 0 "*Save*QuickTime*Movie*" 0 file
pp_Slider 2 100 40 100 16 "JPEG*Quality" 1 1 100 JPEGQ
pp_Slider 3 100 59 100 16 "JPEG*Smooth" 1 0 100 JPEGS
pp_Cycle 4 100 78 100 16 "JPEG*Color" 1 "RGB|Gray" JPEGC
pp_Integer 5 100 105 50 16 "FPS" 1 FPS
pp_Dialog
rc=result
if rc=0 then
do
pp_PermitRefresh
EXIT
end
pp_GetDialog 0
file=result
pp_GetDialog 2
JPEGQ=result
pp_GetDialog 3
JPEGS=result
pp_GetDialog 4
JPEGC=result
pp_GetDialog 5
FPS=result
CALL SavePrefs('MkQT',file,JPEGQ,JPEGS,JPEGC,FPS)
file2=file
ADDRESS value Port
pp_asay 'Saving*Pictures|Please*wait*...'
pp_SavePrefs 1 0 100 0 0
pp_GotoFrame 1
path='perfectpaint:temp/anim'
DO i=1 to count
file=path||i||'.jpg'
pp_Save file 0
pp_NextFrame
END
pp_CloseAsay
pp_asay 'Making*QuickTime*movie|Please*wait*...'
ADDRESS COMMAND
'PerfectPaint:Tools/JPEG2MOV FROM perfectpaint:temp/anim%d.jpg to '||file2||' NEWFPS='||FPS||' MAXFRAMES '||count
ADDRESS value Port
pp_CloseAsay
pp_PermitRefresh
ADDRESS COMMAND 'delete >nil: PerfectPaint:Temp/?#.*'
exit
SavePrefs: PROCEDURE
Prefname='PerfectPaint:Prefs/Rexx_Prefs/'||ARG(1)
if EXISTS(Prefname) THEN DO
ADDRESS COMMAND
'delete >nil: '||Prefname
END
IF OPEN('pfile',PrefName,'W') THEN DO
do i=2 to ARG()
CALL WRITELN('pfile',ARG(i))
end
CALL CLOSE('pfile')
RETURN