| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 
 | #include <windows.h>
#include "avi.h"
 
#include <iostream>
 
#include "Bitmap.h"
 
int main() {
  const char *fns[] = {"1.bmp","2.bmp","3.bmp","4.bmp","5.bmp"};
 
  avi a("FromFile.avi",1000,0); // 1000ms is the period between frames
 
  for (unsigned int i=0; i<sizeof(fns)/sizeof(fns[0]); i++) {  
    Bitmap bmp(fns[i]);
 
 
    // Set up compression just before the first frame 
    if (i==0) { 
      //AVICOMPRESSOPTIONS opts; 
      //ZeroMemory(&opts,sizeof(opts));
      //opts.fccHandler=mmioFOURCC('d','i','v','x');
      a.compression(bmp, 0 /*&opts*/, true, 0);
    }
 
    a.add_frame(bmp);
    ::DeleteObject(bmp);
  }
  //AddAviWav(avi,"wav.wav",SND_FILENAME);
  //a.add_wav("wav.wav",SND_FILENAME);
  //CloseAvi(avi);
} | 
Partager