Distorted Image using TW-Brother MFC-8860DN

Discussions about TWAIN & WIA scanning in GdPicture.NET using GdPictureImaging.
Post Reply
kirtom
Posts: 2
Joined: Mon Jul 11, 2011 8:43 am

Distorted Image using TW-Brother MFC-8860DN

Post by kirtom » Mon Jul 11, 2011 9:06 am

Hi,

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.
gd_distorted.png
Example using 8860DN
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();
TWAIN-Settings are:

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);
Do any suggestions come to your mind? What might be the reason for this strange behaviour?

To cause a little more confusion:
The referred device produces a proper image by using MS Paint..

Best regards

kirtom

kirtom
Posts: 2
Joined: Mon Jul 11, 2011 8:43 am

Re: Distorted Image using TW-Brother MFC-8860DN

Post by kirtom » Wed Jul 13, 2011 7:05 pm

I've successfully solved the problem by switching TWAIN-settings from grayscale to rgb.

Why does this help concerning the MFC-8860DN?

I've had a similiar problem with an OKI device. There, i had to switch from bw to grayscale to even produce an image [if I hadn't, the produced image would have been blank (white)].

Is this GDPicture-"bug" (?) fixed in V8?

Dear Loic:
Closing my ticket by stating "double post" and not replying to this post does disappoint me (your customer).

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Distorted Image using TW-Brother MFC-8860DN

Post by Loïc » Thu Jul 14, 2011 9:58 am

Hi,

It is the second time I heard about this issue with the MFC-8000 family.
Please, provide a tiff image generated by a simple call to SaveAsTiff() which must be placed after "if (ImageID != 0){"

I also need a bunch of information + a tests from your case. Just follow all steps described on this thread: viewtopic.php?t=1486

Kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest