I am having problems "acquiring" the scanned image properly from a Brother MFC-8860DN device (using GDPicture 7.4.0.3).
To be precise, the underlying code works on 99% of all tested scan-devices (i.E. fi-4120, fi-6130, hp 8500, etc.) but sadly not with this one.
To visualize the distortion, i've attatched an example of the scanned image.
The sourcecode used to create the image is (IMHO) mostly equal to:
Code: Select all
do
{
ImageID = oGdPictureImaging.TwainAcquireToGdPictureImage(new WindowInteropHelper(_ParentWindow).Handle);
if (ImageID != 0){
nImageCount++;
string sTempName = System.IO.Path.GetTempFileName();
oGdPictureImaging.SaveAsJPEG(ImageID, sTempName, 75);
oGdPictureImaging.ReleaseGdPictureImage(ImageID);
}
} while (oGdPictureImaging.TwainGetState() > TwainStatus.TWAIN_SOURCE_ENABLED);
oGdPictureImaging.TwainCloseSource();
Code: Select all
oGdPictureImaging.TwainSetIndicators(false);
oGdPictureImaging.TwainSetModalUI(false);
oGdPictureImaging.TwainSetAutoFeed(true);
oGdPictureImaging.TwainSetAutoScan(true);
oGdPictureImaging.TwainSetHideUI(true);
oGdPictureImaging.TwainSetPaperSize(TwainPaperSize.A5);
oGdPictureImaging.TwainEnableDuplex(false);
oGdPictureImaging.TwainSetPixelType(TwainPixelType.TWPT_GRAY);
oGdPictureImaging.TwainSetBitDepth(24);
To cause a little more confusion:
The referred device produces a proper image by using MS Paint..
Best regards
kirtom