Document Imaging SDK,
Cover Page Generator
Moderator: Technical Support Team
How can I load a TIFF image to a BIDIB in memory in C#? All of the LoadXXXX methods seem to only accept paths to a file... The reason I ask is because the user is going to scan a document from using TWAIN, then it may need to be maniulated further (resize, crop, etc). The resize and crop methods are in the BIDIB class and the scan acquisition is going to be done in another class. So how do I move the image data from one class to another?
- Posts: 1
- Joined: Mon May 11, 2009 12:37 pm
If you scan into memory using Black Ice’s BiTwain.ocx control, the BiTwain control returns with a hDib object. You can use this hDib object as an input parameter for methods of BiDib.ocx without any conversion, because hDib is not a class. It is a handle to a device independent bitmap stored in the memory.
For example: If you check the Scanning C# sample you will see the scanned hDib can be displayed with BiDisp.ocx without any conversion.
private void BiTwain_Done(object sender, AxBITWAINLib._DBiTwainEvents_DoneEvent e)
if (e.hDibOutput > 0 && CHKVIEWIMAGE.Checked)
// Show scanned image
if (e.hDibOutput > 0)
private void ShowScannedImage(int hDib)
FormShowImage dlg = new FormShowImage();
dlg.BiDisp.hDib = hDib;
- Posts: 944
- Joined: Sat Mar 20, 2004 11:50 am
Return to Imaging Toolkits
Who is online
Users browsing this forum: No registered users and 1 guest