Twain Sane and Mac OS 10.7 Lion

I think suitable to put here a following subject of the similar topic in the Mac OS 10.6 section.


I try to sum up:


- the Twain Sane interface of Mattias Ellert no longer works properly under Lion. In Graphic Converter, it no more appears. In Image Capture, the Preview button works, but the scan button doesn't work, except perhaps with the text mode and tiff format


- At the time, Mattias Ellert did not announce a 10.7 version of his interface


- MacPorts reports a build failure while trying to build Twain Sane on Lion


- If the SANE drivers are still there (Lion installation on Snow Leopard, not a clean install perhaps), the scanimage command on the Terminal is still working and one may scan an entire A4 document for exemple, and then modify if with somme other software. Here is a code, for example:


/usr/local/bin/scanimage --mode Color --format tiff --resolution 600 > ~/scanimage.tiff


- The Snac small software makes it more easy to choose the parameters of the scanimage command, with a little graphic interface. There are less possibilities than in Twain Sane Interface, but though announced for Tiger, it seems to still works with Lion, perhaps after a new intall.

Posted on Aug 16, 2011 4:58 AM

Reply
39 replies

Sep 21, 2011 10:55 AM in response to boninmi

First to confirm SANE is installed, try making a scan from Terminal as discussed further up the thread and in the installation text file from Bob Rost. If that works, SANE is installed and working.


I had to fool around with Image Capture, remember to HIDE DETAILS or it won't work. If still no go, have you tried scanning with OpenOffice or using SNAC as a front end or GraphicConverter scan with Image Capture option? I would suggest going through the list in order to isolate the problem as being SANE or one of the front-end programs. You might also have to configure the pref file for your particular scanner. IIRC you need to use Show Files again.


There won't be an icon as the SANE frontend isn't Lion compatible and it is not installed at this point. There is no System Preferences pane at this point, same reason.

Oct 3, 2011 8:52 AM in response to laufromkoeln

laufromkoeln wrote:


I tried but:

scanimage: no SANE devices found


This is not surprizing as you said you deleted the SANE files.

Reinstall them either with the Bob Rost files, or the Filip Huška packages (I think it is more easy with the packages):


http://linuxadmin.info/others/software/backup_macosx/sane/


In the second case, please install first libusb, then sane-backends, then twain sane interface, then preference pane.


After having done it, try the scanimage command from the Terminal, or directly try to scan with Image Capture with "Hide details".

Nov 4, 2011 2:37 PM in response to boninmi

SANE is also available from Fink (I use Fink Commander), just select the 4 files and Install from Source....you will need to click accept default a couple of times then it will compile and install.


THERE IS NO PREF PANE (YET), but that doesn't mean you don't need to input your scanner information to the CONFIG file.....use Spotlight to find the approprate config file, you may have to go to the SANE website to determine the correct file name to search....I have a CanoScan so in my case it is Plustek.conf It will open or you can open it in TextWrangler or another text editior (not a work processor) and read the file carefully. In my case I added two lines:


[usb] 0x04a9 0x220d

device /dev/usbscanner


You get the manufacturer and model number from System Preferences/USB


The # signs signify comments, make sure you don't add them in front of your device info.


I can report that after saving the config file I can now scan normally in LibreOffice and Image Capture....still have some issue in Graphic Converter, I will try it again after I restart. SNAC was a good bridge, but not needed any longer, so I haven't tried it....


Just looked at my earlier post and in Graphic Converter, it appears to have only scanned before by using Image Capture and not directly using TWAIN, it still seems to work that way which isn't perfect, but one can save in a number of formats in Image Capture and cut/paste or import directly into Graphic Converter. So it now is useable in the 3 programs I have ever scanned with, though it would be nice if it scanned directly using TWAIN....perhaps the Graphic Converter update will correct this issue.

Nov 4, 2011 3:06 PM in response to Seattle Snapman

I installed the Update to Graphic Converter and restarted, now it scans using TWAIN. So all is good!


Want to add that it might be quicker and easier to install the binary packages from


http://www.ellert.se/twain-sane/


Just looked at the SANE downloads and it does include the Pref Pane that for some reason Fink ommitted. I will try to install it, just for fun, but it is working 100% on 10.7.2 here,


Installed Pref Pane and it shows up in System Preferences, just to confirm that works too.

Feb 11, 2012 8:30 AM in response to boninmi

I was a bit too optimistic. There are still some bugs with the Twain Sane Interface. I am now with Mac OS 10.7.3 and Graphic Converter 7.6.1, HP ScanJet 3300C. The cursors and triangle menus for the dimensions of the area make the interface quit. In grey mode, only vertical strips appears (seems like an old bug mentionned long ago). One can however scan in color mode dragging the mouse to define the area.

May 14, 2012 1:38 PM in response to boninmi

After installing the twain-sane packages for lion from http://www.ellert.se/twain-sane/ i've been using the following home made applescript for some time now to be able to use my Canoscan Lide 30. Feel free to adapt it to your needs...


Regards,

wimdmr

--------

set fromTop to 0

set fromLeft to 0

set theWidth to choose from list {"50", "100", "150", "200", "215"} with prompt "This wide:" default items {"215"} OK button name "OK" --215

set theHeight to choose from list {"50", "100", "150", "200", "297"} with prompt "This high:" default items {"297"} OK button name "OK" --297

set theFormat to (button returned of (display dialog "Choose file format to be used:" buttons {"tiff", "pnm"} default button 1))

set theRes to choose from list {"50", "100", "150", "200", "300", "600", "1200"} with prompt "with scan resolution:" default items {"150"} OK button name "OK"

set theMode to (button returned of (display dialog "and Color scheme Specify Colors" buttons {"Color", "Gray", "Lineart"} default button 2))

set theFile to quoted form of POSIX path of (choose file name with prompt ("Choose file name: (no spaces)") default name "Scanimage-1" default location (path to downloads folder)) & "." & theFormat

set theScript to "/usr/local/bin/scanimage -t " & fromTop & " -l " & fromLeft & " -x " & theWidth & " -y " & theHeight & " --format " & theFormat & " --mode " & theMode & " --resolution " & theRes & " > " & theFile

--return theScript

do shell scripttheScript

-----

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Twain Sane and Mac OS 10.7 Lion

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.