CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 1999
    Posts
    3

    DIB and all graphic stuff !!!

    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.



  2. #2
    Join Date
    May 1999
    Posts
    8

    Re: DIB and all graphic stuff !!!

    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.



  3. #3
    Join Date
    May 1999
    Posts
    3

    Re: DIB and all graphic stuff !!!

    I've already see it but it's not veru helpfull.
    I don't understand the base so...

    Chris


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured