Hello, I am working on adding AVI reader/writer support to a computer vision library. We aren't really interested in doing the fancy things you can do with an AVI, fast display to the screen in YUV format, etc. All we want is RGB data.
To avoid having to deal with the decompression stuff, we've been trying to use the IReadStream class. However, I guess our DIB handling class isn't quite up to snuff and doesn't handle all the varieties of dib's out there. Is it possible to use IReadStream::SetOutputFormat() to ensure that no matter what we always get BI_RGB / 16 bit images back from avifile? Currently our reader code looks like this: CImage *image = data_->pVideoReadStream_->GetFrame(true); BITMAPINFOHEADER *header = (BITMAPINFOHEADER*)(image->GetFmt()); dib_.initialize(header); dib_.decode(ptr); // release the current frame image->Release(); Where dib_ is an instance of our own DIB reader class. The DIB reader is supposed to be cross-platform, it takes a Win32 style BITMAPINFOHEADER* and tries to parse the data, reads the image data after the header, and stores the data in 'ptr' as straight RGB data. Is there a way to ensure that the CImage returned from GetFrame() is a particular format? Is GetFmt() an ok way to get the whole BITMAPINFOHEADER, a-la Win32 style? Sorry for all the pesky questions! -- Joshua Pollak Software Engineer Charles River Analytics _______________________________________________ Avifile mailing list [EMAIL PROTECTED] http://prak.org/mailman/listinfo/avifile
