Click to See Complete Forum and Search --> : DIB and all graphic stuff !!!


ChrisThal
May 23rd, 1999, 04:32 PM
Hi everybody,

I really need some HELP.

Here is my problem :
I want to crop a AVI movies into a smaller one and for that, I have got all frame into a DIB format (BITMAPINFOHEADER).
So, I need to crop these DIB but I don't know how!!!

>>> How can I manipulate DIBs ?

Every functions I know (BitBlt) work with HBITMAP.

>>>What is the difference between DIB and GDI ? Do I need to transform my DIB ? How ?

Some function like SetDIBitstoDevice uses HDC(Device context).

>>> Is it possible to creat DC from a DIB so that the function work on DIB ?

I've found DIB_Bitblt in dibeng.dll but I don't manage to use it. I've tried :



typedef BOOL (*PExportedFn)(LPPDEVICE, WORD, WORD, LPPDEVICE, WORD, WORD, WORD, WORD, LONG , LPBRUSH , LPDRAWMODE );
PExportedFn pfnEF;
DWORD error ;
HMODULE hMod = LoadLibrary("dibeng.dll");

if (hMod == NULL )
{
error = GetLastError();
ErrMsg("Erreur : %d",error);
return NULL;
}



//BOOL DIB_BitBlt(LPPDEVICE, WORD, WORD, LPPDEVICE, WORD, WORD, WORD, WORD, long , LPBRUSH , LPDRAWMODE )


pfnEF = (PExportedFn)GetProcAddress(hMod,"DIB_BitBlt");


pfnEF(hbmNew,0,0,hbm,0,0,50,50,SRCCOPY ,NULL,NULL);





>>> Why does Error return 31 //A device attached to the system is not functioning. // ?

PLEASE, help me because I've tried everything !!!

Chris.

Andre
May 23rd, 1999, 05:13 PM
Hi, Chris !
Please, see answer on:

Newbie: How do I create a DIB from an array ? | Graphics | Anonymous | 5/21/99 02:45 pm

Andre.

ChrisThal
May 23rd, 1999, 05:19 PM
I've already see it but it's not veru helpfull.
I don't understand the base so...

Chris