PeasyScan Image Scanner Program

Word processors, spreadsheets, presentations, translation, etc.
Message
Author
User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#21 Post by rcrsn51 »

Your peasyscan uses /root directory as the working directory.
The xscanimage back end uses /root as its default save path. To change it to something like /tmp would require messing even more with its source code. The original xscanimage lets you select a save path, but that is hidden in xscanimage-peasy. Maybe I'll look at that again.

As long as the program is terminated correctly, the temporary work files in /root will always be deleted.

I appreciate the confusion between "Quit" and "Done." "Done" is used to gracefully close the xscanimage window and send control back to the main window. "Quit" terminates the whole program. If you watch the flash video, you will see this in action.

Your screenie shows a "Save" button, but it is not needed by xscanimage. As soon as you click Scan, the raw pnm data is saved to /root/out.pnm.

Is your screenie just a mock-up or have you written the actual C code to generate it?

Thank you for the tip about viewnior displaying pnm files. However, if someone changed their default image viewer to another program, they might lose that ability and the preview function would be broken.

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Showing scanned image

#22 Post by shinobar »

Thanks for the reply, rcrsn!
rcrsn51 wrote:Is your screenie just a mock-up or have you written the actual C code to generate it?
Its my artwork using gimp :wink:

I saw the flash. It shows the scanned image right after the scanning has been completed.
But the peasyscan-1.3.1 doesn't show the image after the scan.
The image is shown after i click the 'Done' button. :?:
This is one issue i wonder.

Suppose the peasyscan shows the scanned image right after the scanning has been completed.
I may have no idea to click the 'Done' button at this point of time.
I would like to save the image to the final place.
So, i look for the 'save' button and find it at the previous window...
This is the second issue i confused.

My idea in my previous post is to place the 'Save' button on the second window. Then i though the first windows can be integrated in the second, we can call it the main window.
In my idea, the 'Save' button on the second, our new 'main' window, moves the scanned image to the chosen final place with the chosen format. The work files are to be removed right after the save is completed.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#23 Post by rcrsn51 »

I am working on a new version that puts the out.pnm file in /tmp.

The second window is produced by the program xscanimage-peasy whose source code is C. It has already been altered slightly from the original xscanimage code. What you are suggesting makes sense, but I am not a good enough C programmer to implement it.

There is another issue. The content of the second window is not fixed. It varies depending on the sane backend of the particular scanner. For example, my HP scanner only shows Scan Mode and Resolution. So it would be difficult to lay out a window like you have in your screenie.

But I agree that the current labels on the buttons are confusing.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#24 Post by rcrsn51 »

Peasyscan 1.4 is now posted above.

User avatar
charlie6
Posts: 1230
Joined: Mon 30 Jun 2008, 04:03
Location: Saint-Gérard / Walloon part of Belgium

#25 Post by charlie6 »

Hi rscrn51,
I much appreciate peasyscan for its simplicity, thanX for it !
Testing it on wary504 in live-cd session:
The USB scanner Canon Pixma seems to be recognized as 'Pixma' is displayed in the top of the peasyscan GUI; the scanner scans the document;
no data is transferred from scanner; file out.pnm is empty (data transfer display keeps awaiting for datas)
So I believe something is missing to transfer the datas from scanner to PC.
Is there some specific driver to install?

Thanks for any answer
Cheers
Charlie

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#26 Post by rcrsn51 »

charlie6 wrote:Is there some specific driver to install?
Which driver are you using? Does Xsane work?

I tested my Canon MP490 in Wary 504 using the pixma-backend-quirky-1.0.21 from here and it worked fine. But I know that your MP160 has been problematic.

Also, I had some strange behaviours with printer/scanners if the unit was already turned on when Wary booted up.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#27 Post by rcrsn51 »

Here is the 64-bit version of Tesseract 3.0 OCR. You can use the same language packages, like tesseract_eng-3.00.pet above, that work with the 32-bit version.

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#28 Post by jamesbond »

Thank you for compiling tesseract. I'll give it a try.

cheers!
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#29 Post by rcrsn51 »

Peasyscan v1.5 is now available. See the top of this thread.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#30 Post by Karl Godt »

Just for the record : peasyscan1.4 that is delivered with the new wary-racy detects my scanner epson2.conf
but segfaults both while preview and scan .

Then I started xsane0.997 which could scan preview and scan .

Then I installed peasyscan1.6 and now it does not even detect my scanner . I am still getting a bunch of :

[11974.994697] ppdev: user-space parallel port driver
[11998.975636] usb 1-2: new full speed USB device number 7 using uhci_hcd
[11999.133762] usb 1-2: New USB device found, idVendor=04b8, idProduct=0851
[11999.133769] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[11999.133774] usb 1-2: Product: USB2.0 MFP
[11999.133777] usb 1-2: Manufacturer: EPSON
[11999.133780] usb 1-2: SerialNumber: 4C4447593131313575
[11999.161384] scsi8 : usb-storage 1-2:1.2
[11999.163105] usb-storage: device found at 7
[11999.163112] usb-storage: waiting for device to settle before scanning
[11999.784501] usblp0: USB Bidirectional printer dev 7 if 1 alt 0 proto 2 vid 0x04B8 pid 0x0851
[11999.787237] usbcore: registered new interface driver usblp
[12000.166611] scsi 8:0:0:0: Direct-Access EPSON Stylus Storage 1.00 PQ: 0 ANSI: 2
[12000.190657] sd 8:0:0:0: [sdd] Attached SCSI removable disk
[12000.191474] usb-storage: device scan complete
[12016.126410] usb 1-2: usbfs: interface 1 claimed by usblp while 'scanimage' sets config #1
[12040.474564] usb 1-2: usbfs: interface 1 claimed by usblp while 'xscanimage-peas' sets config #1
[12042.684236] usb 1-2: usbfs: interface 1 claimed by usblp while 'xscanimage-peas' sets config #1
[12100.944689] xscanimage-peas[5496]: segfault at 50 ip 08054c7b sp bfe1b484 error 4 in xscanimage-peasy[8048000+12000]
[12125.288912] usb 1-2: usbfs: interface 1 claimed by usblp while 'xscanimage-peas' sets config #1
[12127.374444] usb 1-2: usbfs: interface 1 claimed by usblp while 'xscanimage-peas' sets config #1
[12148.264869] xscanimage-peas[6943]: segfault at 50 ip 08054c7b sp bfeab6f4 error 4 in xscanimage-peasy[8048000+12000]
[12156.836415] usb 1-2: usbfs: interface 1 claimed by usblp while 'xscanimage-peas' sets config #1
[12159.041986] usb 1-2: usbfs: interface 1 claimed by usblp while 'xscanimage-peas' sets config #1
[12162.602962] xscanimage-peas[7484]: segfault at 50 ip 08054c7b sp bfbd20c4 error 4 in xscanimage-peasy[8048000+12000]
[12212.370006] usb 1-2: usbfs: interface 1 claimed by usblp while 'xsane' sets config #1
[12214.338053] usb 1-2: usbfs: interface 1 claimed by usblp while 'xsane' sets config #1
[12760.630693] usb 1-2: usbfs: interface 0 claimed by usbfs while 'scanimage' sets config #1


from dmesg .

To me it indicates a bug in the xscanimage code : missing functions or wrong ordering of some arguments to functions .

As far as i can see only
./xscanimage-peasy --version
xscanimage (sane-frontends) 1.0.14 is the only compiled binary of your package .

find /usr -name "*xscanimage*"
/usr/local/peasyscan/xscanimage-peasy

is the only hit i get .

Racy Puppy 5.1.99 2.6.39.4 :
/lib/libc-2.10.1.so
libglib-2.0.so.0.2800.8
libgtk-x11-2.0.so.0.2400.5
sane-config --version 1.0.21

Will test again in RAM .

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#31 Post by rcrsn51 »

What model Epson do you have? Did you read the notes at the start of the thread? Many Epson scanners need the alternate epkowa driver to work in Peasyscan.

I will check out Racy to see if anything is different about it.

Edit: I tested Peasyscan in Racy with an Epson Workforce 320 that uses the epkowa driver and it worked. An HP scanner also worked.

Peasyscan has always had a problem with the old epson2 backend - it's the only one I have seen that doesn't work. Depending on your model, you may be able to use the epkowa driver instead.

Please report back.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#32 Post by Karl Godt »

scanimage -L needs the entries from /etc/sane.d/*.dll & *.conf .
After installing the epkowa backend -2.26.4dotPET and adjusting the entries in /etc/sane.d/dll.conf

epjitsu
#epson
#epson2
epkowa
fujitsu

and commenting all lines in epkowa.conf despite

#usb 0x04b8 0x084f
usb 0x04b8 0x0851
#usb 0x04b8 0x0854

nothing works :scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

whereas using the epson2.conf :

scanimage -L
device `epson2:libusb:001:003' is a Epson PID 0851 flatbed scanner

peasyscan-1.4 scan.sh has got the ^bug of the missing URI^ variable :

Code: Select all

URI=$(scanimage -L | sed 's/^[[:blank:]]*//g' | tr '[[:blank:]]' ' ' | tr -s ' ' | cut -f 2 -d ' ' | sed "s/^\`//g;s/'$//g")
echo 'URI='"$URI"'_EOS'
URI=epson2:libusb:001:003_EOS

The epkowa seemed to work nicely with iscan on other puppies but here i think i have to figure out how to unload the builtin kernel driver usb-storage .... [ something like "echo 0 > /sys/ / / /usb/file" ]

My problem might be also related to USB-1.1 ....

While xsane also refused to work continuously on some puppies with the usblp and usb-storage drivers inserted , it seems to work here despite it causes these error messages in dmesg also ....

Confusing , but xsane seems not to need or to use the xscanimage binary ; perhaps usees the "scanimage" binary .

But now after a successful "scanimage -T" the scanner hangs showing "Scanning..." in the display after "scanimage -v -T" ....

And "iscan" does not want to work , too :
[ 8084.508860] usb 1-2: usbfs: interface 2 claimed by usb-storage while 'iscan' sets config #1

Anger

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#33 Post by rcrsn51 »

Since you have not yet named your printer model, I will assume that it is either a Stylus NX410 or SX410. SANE lists these models as being compatible with the epson2 backend, and we know that they work with Xsane.

However, many recent models, including your NX410, use the epkowa driver. So I don't understand why scanimage -L does not detect it.

I also don't understand why you are messing with the USB modules. I have yet to see a printer/scanner in any Puppy that required that. Unless it has something to do with your particular machine and USB 1.0.

Since iscan should also work with your model, there is something else going on here.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#34 Post by Karl Godt »

Yes , it is a SX415 on the outside of the chassis , but most detection tools say it would be a SX410 .
I don't know if that is related to the usb.ids file . I will cat /sys and /proc for this .

Nevertheless peasyscan will not work with the sane-backend 1.0.20 , too .

Removing usblp and usb-storage || boot with usb-storage.quirks=04b8:0851:i to ignore the usb-storage part of the
scanner did not help either : No error messages in dmesg but still the message-GUI with
Failed to open device `epson2:libusb:001:008' : Invalid argument .

So I will explore the sane|xsane versions more precisely , because with sane-backend-1.0.20 I have 'bin' for black&whiite
and with sane-backend-1.0.21 'lineart' and few other things like the 'Threshold' slider in xsane
not showing up at all '0996+0998' or if it vanishes , it does not reappear except closing and starting xsane again '0997' .

If I can manage peasyscan to work on one Puppy I will report .

Nevertheless , thank you for the code !

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#35 Post by rcrsn51 »

Independent of Peasyscan, Epson claims that your SX410/415 is designed for the epkowa backend and iscan. So "scanimage -L" should definitely detect it and iscan should work with it. So Xsane should be giving you two choices for the backend.

Since none of that is happening, I am sure that this is a hardware issue. Do you have another machine to test this on?

Also, I know for a fact that an NX415 does work with epkowa. So I am surprised that an SX415 does not.

Once you can get the epkowa backend detected, I am sure that Peasysan will work for you. But it definitely won't work with the epson2 backend.

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#36 Post by DaveS »

Peasyscan wifi seems screwed in Slacko RC :(
http://www.murga-linux.com/puppy/viewto ... 753#571753

EDIT My fault. Re-installed scanner driver and it is OK now :)
Last edited by DaveS on Sun 09 Oct 2011, 12:47, edited 1 time in total.
Spup Frugal HD and USB
Root forever!

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#37 Post by rcrsn51 »

DaveS wrote:Peasyscan wifi seems screwed in Slacko RC
There's nothing like a detailed bug report :wink:

I tested it myself and there were no problems. Lacking any specific info, here are some suggestions:

1. Has your printer changed its IP address?
2. Have you addressed the firewall issue?
3. Did you install the HPLIP scanner driver again?
4. Did you update your Peasyscan config file?
5. Is it working with USB?

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#38 Post by DaveS »

rcrsn51 wrote:
DaveS wrote:Peasyscan wifi seems screwed in Slacko RC
There's nothing like a detailed bug report :wink:

I tested it myself and there were no problems. Lacking any specific info, here are some suggestions:

1. Has your printer changed its IP address?
2. Have you addressed the firewall issue?
3. Did you install the HPLIP scanner driver again?
4. Did you update your Peasyscan config file?
5. Is it working with USB?
Ha ha.. I put a bit more on the Slacko thread. IP address correct, firewall addressed, installed scanner driver (its a new install of Slacko RC, fresh save file), updated config file, yes, it works on USB. HP printer, wifi. My guess is its the same issue as Racy, so will try installing your patch in a short while.

Edit.. re-installing driver fixed it.
Last edited by DaveS on Sun 09 Oct 2011, 12:48, edited 1 time in total.
Spup Frugal HD and USB
Root forever!

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#39 Post by DaveS »

Huh... re-installed scanner driver and it is fine now! Happens I guess.
Spup Frugal HD and USB
Root forever!

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#40 Post by rcrsn51 »

That's good news. Would you mind editing your other posts to indicate that there is no problem.

Post Reply