ObjectTWAIN Advanced Features
We mentioned ObjectTWAIN's rich support for advanced TWAIN
features - this page is a list of some of the aspects of ObjectTWAIN which we
think makes it unique, features you won't find in any other TWAIN component.
-
Query or Set ANY TWAIN Capability. TWAIN exposes custom scanner
features (like the MARS controller - a microfilm film positioning controller
specific to Minolta microfilm scanners) through "custom
capabilities", and being able to query for, query, and set these custom
capabilities means you'll never run into a scanner feature you can't support in
your application.
-
Complete Programmatic Control. You can ask ObjectTWAIN to hide the
TWAIN driver's own user interface, and supply your own (or scan with no user
interface). With our capability support, this means you can write
your own application's user interface to expose as much scanner functionality
as you like, without having to use the native driver's UI to get at that
functionality.
Our MicroDAX application, for example, provides a "panel" that shows
all of the settings on the scanners we support, right on the application's main
UI. This is great for workflow - and we did this completely with
ObjectTWAIN. Some components support controlling brightness and contrast,
or just a few capabilities programmatically, but with ObjectTWAIN, you get them
all.
-
IntelliSense support for TWAIN types. We expanded all the standard
TWAIN enumerations and created real COM classes for the TWAIN structures and
containers, so when you're working in a visual environment you get the full
support of the IDE.

-
Asynchronous (modeless) design. With ObjectTWAIN you can bring up
the TWAIN driver's user interface, or a start a UI-less scan, modelessly.
This means your application continues to run, continues to respond to
user input, and the ObjectTWAIN control will fire events when required (new
images, new buffers, etc depending on how you configure it).
This gives you the freedom to design your user interface however you like - and
to respond to device events as they are fired (for example, the user pushing
buttons on the scanner).
Internally this means ObjectTWAIN has some custom message hooking technology
that can actually run a separate message loop for each TWAIN session.
-
Multiple simultaneous TWAIN Sessions. This unique feature allows
you to have more than one TWAIN session active. In a production
environment where you have an application that would benefit from more than one
scanner this feature would be invaluable - and impossible without the
asynchronous nature of ObjectTWAIN.
-
Multi-page TIFF output. You can create single page TIFF files or
you can scan a batch of images into a single multi-page TIFF. ObjectTWAIN
also supports all common TIFF compressions including G4 for monochrome images.
-
Native or Memory to Disk Transfer Mode. This is something we added
to ObjectTWAIN to make it easier for a developer to work with, and to help work
around incompatibilities or idiosyncrasies of various TWAIN drivers. The
Native / Memory to Disk option causes the TWAIN Native or TWAIN Memory transfer
modes to actually be written to a disk file (whose name you can specify
programmatically or on the ActiveX control's property pages).
The main reason for this feature is that sometimes what you really want is a
disk file and your scanner driver doesn't support the "file" transfer
mode. In this case the feature would save you from having to write your
own code to save the file to disk. This feature is also useful when you
want a disk file but the driver is faster or more reliable when using native or
memory transfers; with the "native/memory to file" functionality you
can choose the transfer mechanism that works best with the driver you're using,
and always get a file as the result.

This feature is also useful with the .NET environment where a DIB handle (the
product of a native transfer) is difficult to work with; you can rely on
ObjectTWAIN scanning to disk and then read the image from there.
As you can see ObjectTWAIN is more than a simple component for
scanning.. but when it comes down to it if all you want is an image, you only
need to instantiate the ObjectTWAIN OCX and add a few lines of code to start
the scan:
-
TWControl1.OpenSession hWnd
TWControl1.TransferFile = "myimage.bmp"
TWControl1.StartFileAcquisition
Add a few lines of code to catch the event that's fired when the
transfer is done and close the session, and you're done. See the
ObjectTWAIN Manual HTML or
PDF for complete examples (or download an
unlimited evaluation version of ObjectTWAIN and try it out yourself!)
|