opensubscriber
   Find in this group all groups
 
Unknown more information…

a : avifile@prak.org 26 May 2005 • 1:49PM -0400

[Avifile]ReadFrames
by Johan Kohler

REPLY TO AUTHOR
 
REPLY TO GROUP



Hi,
I'd like to extract all the frames of a clip, convert them
to an intermediate format and store them in an array for
processing.  I'm currently using ReadFrame:

//for each frame in stream do:
avm::CImage* frame = aviStream->ReadFrame(true); //Read
frame
avm::BitmapInfo *hdr = new
avm::BitmapInfo(frame->Width(),frame->Height(),24) //
convert bmp to "header format"
avm::CImage* bmp= new CImage(frame, hdr); // make bmp
Glib::RefPtr<Gdk::Pixbuf> pixbufframe =
Gdk::Pixbuf::create_from_data(bmp->Data(),
Gdk::COLORSPACE_RGB, FALSE, 8, bmp->Width(), bmp->Height(),
bmp->Stride()); //make pixbuf
//store pointer in array

Is it better to use ReadFrames though?  How do I determine
the size of memory to allocate to the buffer, and how do I
access individual frames then?

Thanks,
Johan
_____________________________________________________________________
For super low premiums, click here http://www.dialdirect.co.za/quote

_______________________________________________
Avifile mailing list
avifile@prak...
http://prak.org/mailman/listinfo/avifile

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

opensubscriber is not affiliated with the authors of this message nor responsible for its content.