This project is read-only.

Custom Extended Image Information

Jun 12, 2009 at 3:27 PM

I'm trying to use a Canon CR-180 check scanner, and retrieve the micr data.  I belive this data would be stored in the custom extended image info by the driver.  However, when I run through the scan, I see:

Looking for custom ExtImageInfo - Start
Looking for Custom ExtImageInfo - -Finished

I assume the custom ext image info search would work in the same manner as the standard ext image info... return everything.  Is that assumption incorrect?

I've verified that I do have micr read enabled in the twain driver, but no such luck.  Do I need to specify the custom ext image info I am looking for?

Thanks again for your help.

Jun 12, 2009 at 9:26 PM
Edited Jun 12, 2009 at 9:27 PM

This is a fun question, 'How to find custom driver stuff without the help manual'. 
I can tell you what the code tried to do and then what I would do and where to look for more.

the code tried to find extended imageinfo (both standard and custom) when each image is recieved.  Under both the FileXfer and NativeXfer (I never implemented bufferedXfer) on the Get op I run:

        Select Case rc
            Case Enumerations.ReturnCode.XferDone
                twain.TwState = 7

so I update the member twState vaiable when rc=XferDone, then I gather the ImageInfo, then the standardExtendedImageInfo, then I start to guess. 
the LookForCustomExtImageInfo(300) member just executes OperationTriplets.Image.ExtImageInfo.Get() a whole bunch of times - 300 in this case but you could change it to
twain.LookForCustomExtImageInfo(3000) and it shouldn't take much longer to see if maybe they hid something above H8300.  If you had the vendor's custom twain header (of if you were dealing with a kodak device and had all the docs)
you wouldn't have to guess.  I've know devices to return information and can imaging that other devices won't return any unless you fisrt cap some other custom cap first.  guessin gif fun that way, you just never know.
What woukd I do.  I would call the vendor.  Does that usually work for me? No, not really.  Usually I get jerked around for a week by the support guys who also don't have the docs. 
Often the documentation is tricky even for them as many vendors subcontract the driver development.  But sometimes you hit gold.  Sometimes the vendor has the docs and can help - thats why I call.
From there if I were still curious I would go tinker with the 2.0 twain dll.  The 2.0 spec and dll actually supports mirc.  Before the 2.0 spec if the vendor wanted to support mirc they either coded it into the extendedImageInfo or into a customCap
as there was nowhere else for them to stick it.  I even have a thread over on twainforum from 2006 where a driver developer asked about this (search twainforum for 'mirc' the thread subject is 'help') 
In 2.0 mirc is built into the spec.  Once or if you get here, if you're still using and opentwain you'll have to handcode some more stuff as opentwain wasn't built for the 2.0 spec. 
Definition will need added and some caps will needed added.  I had hoped to get 2.0 support into opentwain earlier this year, but I couldn't fit it into the schedule.
I'll help where and when I can but major work will have to come from you or the community or sadly wait.
Try twain.LookForCustomExtImageInfo(3000), then see if you can get a header (where the vendor defines where they stuck the mirc info).  Then let me know.