Scan an image with TCL/TK code
Posted by kota (kota), 14 April 2004Hello,
I have a scanner and i want to control it(get an image)
with TCL/TK code. Is it possible?
Posted by admin (Graham Ellis), 15 April 2004I'm sure it is, but you might end up embedding Tcl in a C application or embedding C commands within your Tcl - both of which are features that are what Tcl was initially designed for but have become a bit specialist these days.
Another option would be to to use expectk to control an already existing application you might have for the scanner so that you use that application to do the hard work, and Tcl and Tk to provide additional automation and a GUI.
What are you wishing to achieve by scanning from Tcl/Tk? What drivers / controls do you have already for your scanner? What operating system are you going to be using? If you can answer these three questions it'll help you (and us if you post again) fine tune the answer and find which if any routes are worth investigating further.
Posted by kota (kota), 15 April 2004Thank you very much for spending time to reply!
First of all, i wish to make a scanner work with
TCL/TK or C++. Put an image in the scanner
and save it in a folder.
I think the answer of the drivers is....TWAIN (, i thnk).
I didn't make any drivers, just the authentic(from the cd). The operating system is win98
Sorry if some of the above things, make you nervous
Posted by admin (Graham Ellis), 16 April 2004I think I would tend to look at spawned / forked processes rather than writing my own driver BUT Windows 98 is really pretty poor at this sort of thing (and I'm not a Win98 expert). If you've a scanning application that runs from the command line on that CD, you may do better writing a batch file, perhaps with some Tcl control over it. Expect-based solutions are always a bit flakey on Windows (especially older versions) so that option (the one I would choose on Linux / Unix) is probably out, and I wouldn't want to get involved at a C++ level
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: firstname.lastname@example.org • WEB: http://www.wellho.net • SKYPE: wellho