Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Get a bitmap from an AVI file

0.00/5 (No votes)
2 May 2006 1  
A simple idea about getting a bitmap from an AVI file.

Sample Image - Get_bitmap_from_AVI_file.jpg

Introduction

Many articles have discussed how to get a bitmap from an AVI file. So this article can only give the first concept to those have no idea of the AVI API, just as what I was a few weeks ago. This application adds some feathers; these include: adjusting the ratio of a bitmap to a certain value, such as a change from 16:9 to 4:3, adding a caption at the top of a bitmap etc.

Using the code

The function GetBitmap is from Corinna John's article, you can read it for more details. To get the bitmap from an AVI file:

Bitmap bmp = AviBase.GetBitmap(txtFileName.Text, Convert.ToInt32(numPosition.Value));

here is how you adjust the format of the bitmap:

FormatBitmap f = new FormatBitmap();
f.m_nCaptionFontHeight = (int)numFontSize.Value;
f.m_nCaptionFontLeftSpace = (int)numLeftSpace.Value;
            
Bitmap bmp1 = f.GetFormattedBitmap(bmp, textCaption.Lines);

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here