Thanks for the responses everyone.
The DIB I am getting is from EZTWAIN (an image acquired from a scanner).
This is the function description they give:
Sorry, this Windows DIB stuff is new and confusing for me.Code:HANDLE EZTAPI TWAIN_AcquireNative(HWND hwndApp, unsigned wPixTypes); // The minimal use of EZTWAIN.DLL is to just call this routine, with 0 for // both params. EZTWAIN creates a window if hwndApp is 0. // // Acquires a single image, from the currently selected Data Source, using // Native-mode transfer. It waits until the source closes (if it's modal) or // forces the source closed if not. The return value is a handle to the // acquired image. Only one image can be acquired per call. // // Under Windows, the return value is a global memory handle - applying // GlobalLock to it will return a (huge) pointer to the DIB, which // starts with a BITMAPINFOHEADER. // NOTE: You are responsible for disposing of the returned DIB - these things // can eat up your Windows memory fast! See TWAIN_FreeNative below. // // The image type can be restricted using the following masks. A mask of 0 // means 'any pixel type is welcome'. // Caution: You should not assume that the source will honor a pixel type // restriction! If you care, check the parameters of the DIB.




Reply With Quote