这里是带有AVI主要功能的ac#项目 http://www.codeproject.com/Articles/7388/A-Simple-C-Wrapper-for-the-AviFile-Library
这里使用VideoStream从bmp文件创建视频制作帧
//load the first image
Bitmap bitmap = (Bitmap)Image.FromFile(txtFileNames.Lines[0]);
//create a new AVI file
AviManager aviManager =
new AviManager(@"..\..\testdata\new.avi", false);
//add a new video stream and one frame to the new file
VideoStream aviStream =
aviManager.AddVideoStream(true, 2, bitmap);
Bitmap bitmap;
int count = 0;
for(int n=1; n<txtFileNames.Lines.Length; n++){
if(txtFileNames.Lines[n].Trim().Length > 0){
bitmap =
(Bitmap)Bitmap.FromFile(txtFileNames.Lines[n]);
aviStream.AddFrame(bitmap);
bitmap.Dispose();
count++;
}
}
aviManager.Close();
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8455 次 |
| 最近记录: |