想把一系列bmp图片做成avi视频,请教用vc怎么做?

解决方案 »

  1.   

    http://dev.yesky.com/374/2304874.shtml
    网上有现成的!
    http://zhidao.baidu.com/question/111990069 这里面还有代码!
      

  2.   


    #include <vfw.h>#define TEXT_HEIGHT    20
    #define AVIIF_KEYFRAME    0x00000010L // this frame is a key frame.
    #define BUFSIZE 260class CAVIFile : public CObject
    {
    public:
        CAVIFile(LPCTSTR lpszFileName, int xdim = -1, int ydim = -1);
        virtual ~CAVIFile();    virtual bool AddFrame(CBitmap& bmp);
        CString GetFName() const             {return FName;};
        virtual bool IsOK() const            {return bOK;};private:
        CString FName;
        int xDim;
        int yDim;    AVISTREAMINFO strhdr;
        PAVIFILE pfile;
        PAVISTREAM ps;
        PAVISTREAM psCompressed;
        PAVISTREAM psText;
        AVICOMPRESSOPTIONS opts;
        AVICOMPRESSOPTIONS FAR * aopts[1];
        DWORD dwTextFormat;
        char szText[BUFSIZE];
        int nFrames;
        bool bOK;
    };
      

  3.   

    http://topic.okbase.net/200905/2009050116/3624712.html
      

  4.   

    看到那个代码了  可是运行时错误  
    调试时到hr = AVIFileCreateStream(pfile,&ps,&strhdr);出错 
     不知为什么
      

  5.   

    去网上下个最新版的XVID来安装,重启编译器,重新运行程序,应该就OK了这是里面的原话!
      

  6.   

    opencv不超过10行代码
    直接就有范例的