Solved

Create Avi from TBitmap

Posted on 2004-09-17
5
311 Views
Last Modified: 2010-04-05

Hi !
I receive a TBitmap every second in my app. I would like to create an avi file
out of them. I'd need a sample code which

- creates an avi file (320x240)
- adds TBitmap in a loop
- closes the avi file

The avi should be compressed. I searched EE it seems that there exist a component
but I don't have it and I don't know how to use it. A whole demo project would be nice.

Thanks
fuluppi
0
Comment
Question by:fuluppi
  • 3
  • 2
5 Comments
 
LVL 22

Expert Comment

by:Ferruccio Accalai
ID: 12088607
Take a look at Avibuild (BMP to AVI) from here http://www.efg2.com/Lab/Library/Delphi/Graphics/avibuild.zip
0
 

Author Comment

by:fuluppi
ID: 12089024
Hi !
Thanks for this hint. The source does not compile. I have no idea what to change.
fuluppi
0
 
LVL 22

Accepted Solution

by:
Ferruccio Accalai earned 500 total points
ID: 12089375
Here in this part change BitmapSize type from Integer to Cardinal

procedure TAniToolForm.SpeedButton1Click(Sender: TObject);
var
  i: Integer;
  pfile: PAVIFile;
  asi: TAVIStreamInfo;
  ps: PAVIStream;
  nul: Longint;

  BitmapInfo: PBitmapInfoHeader;
  BitmapInfoSize: Integer;
  BitmapBits: Pointer;
  BitmapSize: Cardinal; //<---this one
begin


F68 ;-)
0
 

Author Comment

by:fuluppi
ID: 12089418
that was a simple one ;-) thanks!
0
 
LVL 22

Expert Comment

by:Ferruccio Accalai
ID: 12089426
Glad to have helped you :)

F68 ;-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now