Re:AVI==>pFrame=?=>TBitmap
Thank Stefan for your answer,
but i don't need to display all frames.
I need to display a frame only if the user want it.
I have a DIB in memory and i perform some operations on pixels, like
Histogram, Difference,...
I perform this operations on many AVI.
When user say "Give me AVI #3 - frame #17", i display it.
How can i do it faster than write DIB on disk, pass from ClipBoard or
TMediaPlayer?
Gianpaolo
Quote
Stefan Jansson wrote:
> Hi there!
> I'm not sure if i know what you want, but if you want a *.bmp from an
> *.avi I think you
> can show the avi on a Panel with TMediaPlayer and then use the
> Panel->Canvas to bet a *.bmp.
> Gianpaolo wrote:
> > Hi,
> > I have an AVI video stream (PGETFRAME pUncompressStream).
> > AVIStreamGetFrame(...) give me a packed DIB (void *pDIB) .
> > How can i retrieve a TBitmap (or TImage or other from pDIB without
> > write data on hard disk ?
> > //....
> > /*Returns a pointer to the frame data if successful or NULL otherwise.
> > The frame data is returned as a packed DIB.*/
> > void *pDIB;
> > PGETFRAME pUncompressStream;
> > pDIB = malloc(dimensionDIB+sizeof(BITMAPFILEHEADER ));
> > //....
> > pDIB= AVIStreamGetFrame(pUncompressStream,FrameIndex);
> > //....
> > Many Thanks for your
> > help,
> > Gianpaolo