home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 November / CPNL0711.ISO / beeld / screen / hcf.exe / Basic / Basic_Image_029_Video_Output.bas < prev    next >
BASIC Source File  |  2004-03-30  |  1KB  |  41 lines

  1. w = 720
  2. h = 576
  3. FramesPerSecond = 25
  4. compress = 0 ' 0...n --> GetVideoCompressor() !
  5.  
  6. filename = "c:\\temp\\test" + compress + ".avi"
  7. print filename
  8. rc = OpenOutputVideo( filename, w,h, FramesPerSecond, compress )
  9. if rc <> 0 Then
  10.     image_old  = CreateImage( w,h )    
  11.     image_fade = CreateImage( w,h )    
  12.     i = 0
  13.     File.Find( "c:\\temp\\tttt\\*.jpg" )    
  14.     For fi = 0 To File.NumberOfElements - 1
  15.         ret = Image(image_fade).Open( File( fi ).Path )    
  16.         Image(image_fade).Resample(w,h)
  17.         if ret < 1 Then
  18.             Print "Open ERROR: ", File( fi ).Path
  19.         Else
  20.             Print i + 1, " ", File( fi ).Path
  21.             If i > 0 Then
  22.                 for j = 0 to 255 step (255/FramesPerSecond/2)
  23.                     Image(0).CopyFrom( image_old )
  24.                     Image(0).DrawImageFade( 0,0,   j, image_fade )
  25.                     Image(0).PutVideo()
  26.                 Next
  27.             EndIf
  28.             Image(image_old).CopyFrom( image_fade )
  29.             i = i + 1
  30.         EndIf
  31.         For t = 0 to (2*FramesPerSecond)
  32.             Image(image_fade).PutVideo()
  33.         Next
  34.         Redraw()
  35.     Next
  36.     rc = CloseOutputVideo()
  37.     Image(image_in).Delete()
  38.     Image(image_fade).Delete()
  39. endif
  40. Print "Ende"
  41.