[vtkusers] vtk movies
Alex Peckham
ap0345 at bris.ac.uk
Tue Jan 6 13:28:36 EST 2004
Hi again,
Here is the C++ code. It shows how to convert a sequence of BMPs to an uncompressed AVI, and how to grab a frame from an existing AVI and write it to a BMP. The code is based on a set of freeware functions called avi utils or something similar (the author's homepage has some good info, I forget the URL but it should be quite easy to find on Google), and the BMP writing part is a quick modification to some other code I had lying around (again based on an example I found on the net, but tweaked to generate the BMP header because when you grab a BMP out of an AVI into memory there is no header).
If you want to grab and write 8 bit bitmaps rather than 16, 24, or 32 bit then the code needs a slight tweak so that the infoheader size is computed as:
lpbi + lpbi->biSize + 256 * sizeof(RGBQUAD);
But if you only want to generate AVIs you shouldn't need to worry about that anyway.
Hope this is of use,
Alex Peckham
Bristol University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040106/09eb833d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avi.zip
Type: application/x-zip-compressed
Size: 10629 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040106/09eb833d/attachment.bin>
More information about the vtkusers
mailing list