Nekochan Net

Official Chat Channel: #nekochan // irc.nekochan.net
It is currently Fri Nov 21, 2014 10:42 am

All times are UTC - 8 hours [ DST ]


Forum rules


Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.



Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: TWAIN
Unread postPosted: Sun Feb 12, 2012 8:20 pm 
Offline

Joined: Tue Feb 24, 2004 5:10 pm
Posts: 9770
Are there any Irix applications that use a TWAIN interface for scanner acquisiton ? I just fingered out that our multi-purpose scanner is actually using TWAIN and would probably be available from Irix as well as Windblows if I had something that speaks TWAIN ....


Top
 Profile  
 
 Post subject: Re: TWAIN
Unread postPosted: Mon Feb 13, 2012 1:56 pm 
Offline
User avatar

Joined: Wed May 07, 2008 7:47 pm
Posts: 329
Location: Seattle, WA
TWAIN is a software interface between an application and a scanner driver, not a hardware interface between an application and a scanner.

_________________
:OnyxR: :IRIS3130: :IRIS2400: :Onyx: :ChallengeL: :4D220VGX: :Indigo: :Octane: :Cube: :Indigo2IMP: :Indigo2: :Indy:


Top
 Profile  
 
 Post subject: Re: TWAIN
Unread postPosted: Mon Feb 13, 2012 7:08 pm 
Offline

Joined: Tue Feb 24, 2004 5:10 pm
Posts: 9770
kjaer wrote:
TWAIN is a software interface between an application and a scanner driver, not a hardware interface between an application and a scanner.

My bad :( Let me correct my sloppy language :

Given a scanner that exposes the TWAIN api, does anyone know of any Irix applications that utilize the TWAIN api to acquire data ?

I was kind of surprised, actually, that this mfc thing uses TWAIN, which allows a couple Windders apps we have to access the device outside the manufacturer's normal drivers. Unusual for a multifunction .... if there are any known Irix apps that use TWAIN, conceivably they could also grab data off the same scanner.


Top
 Profile  
 
 Post subject: Re: TWAIN
Unread postPosted: Mon Feb 13, 2012 11:19 pm 
Offline
User avatar

Joined: Fri May 21, 2004 4:47 am
Posts: 442
Location: Flynn's Arcade
this SAIN/TWAIN stuff has always been obscure for me, but i would say that XSane can drive a twain enabled scanner, but dont nail me down on that. :!:

_________________
no plan


Top
 Profile  
 
 Post subject: Re: TWAIN
Unread postPosted: Tue Feb 14, 2012 2:16 pm 
Offline
User avatar

Joined: Wed May 07, 2008 7:47 pm
Posts: 329
Location: Seattle, WA
Any IRIX app that uses TWAIN still cannot use the scanner unless you have an IRIX TWAIN driver for that scanner. Impresario won't do this for you.

Consider Photoshop. Photoshop supports TWAIN equally well on Macintosh or Windows (maybe even IRIX, who knows). You plug in a scanner that "supports TWAIN", nothing happens. Not until you install the TWAIN driver that knows how to talk to the scanner, that can send the correct commands to the scanner and get data back from it, then translate it into data structures that are meaningful to TWAIN, that Photoshop can use the scanner. Fine, now you have TWAIN scanning working in Photoshop.

Now, consider what happens when you buy a new scanner. Photoshop happily opens your TWAIN driver, for a scanner you no longer have. If it works at all, it sends incorrect commands to the new scanner, maybe gets data back from the scanner, but translates it incorrectly to TWAIN structures, because the data format off the scanner is different. Everything is weird, people are getting emotional. You install the TWAIN driver for the new scanner, which you should have done to begin with, Photoshop happily now opens the TWAIN interface to the _correct_ TWAIN driver, and it works normally, because it's the TWAIN _driver_ that is actually talking to the scanner. Photoshop didn't change. TWAIN didn't change. The TWAIN driver did.

You buy a scanner, it comes with a TWAIN driver, that knows how to talk to the scanner, get data from it, and expose it via a TWAIN interface. Now Photoshop (or any app that knows how to use TWAIN) can get data from your scanner. But you buy a different scanner, Photoshop can't talk to it, until you install the NEW TWAIN driver. An app uses TWAIN to talk to a device driver, which could theoretically be for anything. A scanner, a camera, a video tape unit, a thermal sensor array... any kind of source for image data. Then you don't have to rewrite your app for every possible image source. Just the TWAIN driver. But a Windows TWAIN driver isn't going to run on IRIX.

_________________
:OnyxR: :IRIS3130: :IRIS2400: :Onyx: :ChallengeL: :4D220VGX: :Indigo: :Octane: :Cube: :Indigo2IMP: :Indigo2: :Indy:


Top
 Profile  
 
 Post subject: Re: TWAIN
Unread postPosted: Tue Feb 14, 2012 7:58 pm 
Offline

Joined: Tue Feb 24, 2004 5:10 pm
Posts: 9770
kjaer wrote:
Any IRIX app that uses TWAIN still cannot use the scanner unless you have an IRIX TWAIN driver for that scanner.

Okay, thanks (I think) ... the whole TWAIN thing has never made much sense to me. From their semi-descriptive inchoate literature, it seemed similar to PostScript, a common language for input devices which could easily be modified for each individual device.

But according to your description, it's more like DOS drivers for printers, where every single one is totally different.

No wonder no one uses it. What's the point ?

Oh. I gottit. It's like DOS printer drivers that expose themselves to other APPLICATIONS within the particular operating system. So each application doesn't have to have a separate driver for the device but the driver is non-portable across operating systems.

Again, kind of pointless since that's the main advantage Windows had in the beginning and still has ... and if you don't offer a TWAIN driver for the device for other operating systems, then once again ... pointless. Windows already does this.

Is that correct ?

edit : Look at the date. Boy, we're really cooking with gas now !

http://www.twain.org/docs/twain_20_unix.htm


Top
 Profile  
 
 Post subject: Re: TWAIN
Unread postPosted: Tue Feb 14, 2012 11:42 pm 
Offline
User avatar

Joined: Fri Oct 09, 2009 2:44 am
Posts: 291
Location: Orgerus (France)
hamei wrote:
Oh. I gottit. It's like DOS printer drivers that expose themselves to other APPLICATIONS within the particular operating system. So each application doesn't have to have a separate driver for the device but the driver is non-portable across operating systems.

Kinda.

TWAIN defines two set of interfaces : one set the scanner driver must provide, and one set the TWAIN layer provides to an application. The TWAIN layer is able to enumerate scanner drivers (because they have to be installed in a particular directory, so all it has it try to load every .dll from there and keep those who advertize the necessary interfaces), and your application is then able to pick one, and issue scan requests.

Because TWAIN does not assume any particular capability of the scanner (remember cheap handheld scanners!), the actual scan operation is interactive, and the user interface allowing one to select the scan parameters (dpi, color vs grayscale, etc), is provided by the driver (with a few guidelines from the TWAIN specs to try and have a not-so-inconsistent user experience accross different scanner models).

Still, from a theoretical point of view, the TWAIN application interface could be ported to IRIX (or any other operating system), and the scanner vendors would need to port their TWAIN drivers as well. Don't hold your breath, though ;)

_________________
:Indigo:R4000 :Indigo2:R4400 :Indigo2IMP:R4400 :Indigo2:R8000 :Indigo2IMP:R10000 :Indy:R4000PC :Indy:R4000SC :Indy:R4600 :Indy:R5000SC :O2:R5000 :O2:RM7000 :Octane:2xR10000 :Octane:R12000 :O200:2xR12000 :O200: - :O200:2x2xR10000 :Fuel:R16000 :A350:
among more than 150 machines : Apollo, Data General, Digital, HP, IBM, MIPS before SGI, Motorola, NeXT, SGI, Solbourne, Sun...


Top
 Profile  
 
 Post subject: Re: TWAIN
Unread postPosted: Wed Feb 15, 2012 7:05 pm 
Offline
User avatar

Joined: Wed May 07, 2008 7:47 pm
Posts: 329
Location: Seattle, WA
hamei wrote:
Is that correct ?


Yep, you got it now.

Just one nit, though, there is no need for a TWAIN-like product for printers on Windows, because Windows specifically provides software APIs in win32 for doing much the same thing. But there aren't any for scanners. Thus, TWAIN is still necessary (the same can be said for MacOS).

I think ISIS was more common in the UNIX world. Similar idea, different implementation. A little more modular, which put it more in the spirit of "the UNIX philosophy". Plus, less dependence on a GUI and on sharing the app's address space.

_________________
:OnyxR: :IRIS3130: :IRIS2400: :Onyx: :ChallengeL: :4D220VGX: :Indigo: :Octane: :Cube: :Indigo2IMP: :Indigo2: :Indy:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group