Yep I know so many times it as been asked how to get a bitmap out of dgdecode.dll. I already had a look at several sources like Aquaplanings, the "Getpic" code of Donald etc. but I wasnt able to see the right (API?)function to convert that RGB Data at the *rgb24 Pointer to a regular Bitmap for further use. BTW: Parsing out Width, Height, fps and lenght of the d2v works perfect. Im working in PureBasic and as PBs Syntax is very easy you directly can see(understand the steps in my code). Heres the documentated code sniplet: Code:
openMPEG2Source returns a VIDEOINFO*, from that you get what you're looking for. Note that VIDEOINFO is an AviSynth struct so you have to look in AviSynth.h for the prototype.
Back to my question, I had a look at createBitmap() in getpic.c and SafeBMP() in dgindex.c. So I understand that *rgb24 will be a mem.pointer to a "naked" flipped RGB Data. Then the right values out of mpeg2source's VideoInfo will be set into a BITMAPINFOHEADER structure included in a BITMAPINFO structure at a setted memorypointer like *Bmp. Code:
Or use GetDIBits or SetDIBits, these will remap color space as needed.
--------------------- M3 HREs 3 pcs 12 x 20 rears 9.5 x 20 fronts Brembo big brakes / AAtuning exhaust, Groupe M intake / H&R coilovers / shark injected / VIS carbon hood / ACS front lip / Alpine DVD Navi with Audiobahnnnnnnnnnn blowin it up.___________________ http://img