How to Get ExtendedImageInfo and Patch Codes?

Issue #56 new
Alfredo Gutierrez created an issue

I am using NTwain and is a really really cool Tool for using Twain, easy and simple, but, after days of working with it, I still don't know how to find out if the page is an Patch and which Patch.

I am using a Kodak i5850 scanner.

and trying to modify the Soukoku samples for WPF, I understand that this data should come on the Event DataTransferred or TransferReady.

could someone please help me with this??

Comments (6)

  1. Eugene Wang repo owner

    An example on getting ext image info is in the WinForm sample, and you do this in the DataTransferred event's event object.

    _twainSession.DataTransferred += (s, e) =>
    {
        var infos = e.GetExtImageInfo(ExtendedImageInfo.PatchCode).Where(it => it.ReturnCode == ReturnCode.Success);
        // do what you will with it
    }
    

    If the driver supports it I believe you can get just patch code from extended image info. If not then another place I think would be during the TransferReady event, but I see I'm not exposing this so you can't actually get it (oops). I can make the change but I have no way to test if that'll work at the moment.

  2. Alfredo Gutierrez reporter

    Thanks for the Help!! :)

    I was trying all day to get the ExtendedImageInfo all day, and no luck :( but only trying with the code at the WPF example. I will review the example at Winforms and add it to my project which is actually a DLL, and see if works! thanks and any hint of guide of how to extend your work in order to accomplish what we need is welcomed, I will be very grateful.

    I really appreciate and admire your work, I am pretty sure we will use NTwain for my project at the company I work for. We will be working a lot of time with the scanner and your wrappers are simply the best i've found.

    is there a way I could ask for some extra time of your valuable time and pay you with Bitcoins your fair and hard-earned knowledge. please let me know, I will need a lot of help....

    Thank you very much!

  3. Eugene Wang repo owner

    Afraid I can't commit on time, I will try to answer questions or at least point you to the right directions (hopefully).

  4. Walter Morales

    Hi guys. I'm trying to know when the scanned image is a patch code. Can somebody help me? Thakns

  5. Eugene Wang repo owner

    Either use e.GetExtImageInfo() during the DataTransferred event (see above code and cast to EndXferJob when reading the value) or see if e.EndOfJobFlag has it during the TransferReady event.

    All those require the scanner to support it and must have the JobControl capability (and whatever else) set to appropriate values.

  6. Log in to comment