home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 November
/
CPNL0711.ISO
/
beeld
/
screen
/
hcf.exe
/
Basic
/
Basic_Image_030_Video_Output_Warp.bas
< prev
next >
Wrap
BASIC Source File
|
2004-03-29
|
1KB
|
47 lines
Sub subOut( v as integer )
image_out = CreateImage( 1,1 )
ret = Image(image_out).Open( "c:\\temp\\img\\notebook.jpg" )
Image(image_out).DrawImageWarp( 105,81, 242,81 , 280,172, 147,201, v )
Image(image_out).PutVideo()
Image(image_out).Delete()
EndSub
w = 1024/2
h = 768/2
FramesPerSecond = 15
compress = 15
filename = "c:\\temp\\test" + compress + ".avi"
print filename
rc = OpenOutputVideo( filename, w,h, FramesPerSecond, compress )
if rc <> 0 Then
image_old = CreateImage( 1,1 )
image_fade = CreateImage( 1,1 )
i = 0
File.Find( "c:\\temp\\tttt\\*.jpg" )
For fi = 0 To File.NumberOfElements - 1
ret = Image(image_fade).Open( File( fi ).Path )
Print i + 1, " ret: ", ret, " ", File( fi ).Path
Image(image_fade).Resample(w,h)
if ret > 0 Then
If i > 0 Then
for j = 0 to 255 step (255/FramesPerSecond/2)
Image(0).CopyFrom( image_old )
Image(0).DrawImageFade( 0,0, j, image_fade )
subOut(0)
Next
EndIf
Image(image_old).CopyFrom( image_fade )
i = i + 1
EndIf
For j = 0 to (2*FramesPerSecond)
subOut(image_fade)
Next
Redraw()
Next
rc = CloseOutputVideo()
Image(image_in).Delete()
Image(image_fade).Delete()
endif
Print "Ende"