PeasyScan Image Scanner Program
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
Yes thanks, I remember that now from our previous discussion.
Maybe that pnm file should be put in /tmp.
When scanning in color it can grow a lot.
Even resizing the scan area did work.
Maybe that pnm file should be put in /tmp.
When scanning in color it can grow a lot.
Even resizing the scan area did work.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]
On the user interface
Great work, rcrsn51!
Your peasyscan is much smaller than Xsane and promising.
I have some requests to brash up the user interface,
1. Working directory
Your peasyscan uses /root directory as the working directory.
Can we choose the working directory under /mnt/home or somewhere?
Or, we can set the working directory at the same directory of the final save place.
Why not /tmp as the default working directory?
Sometime the work files were left at /root. It they are under the /tmp, they will be erased at shutdown.
2. Default saving image file name
I suppose it will be convenient if the image file name is preset, like '/root/my-documents/clipart' or somewhere.
Keeping the last used file name is more nice.
3. Control window hierarchy
What i am confused is the hierarchy of the GUI windows.
The first window has 4 buttons, Reset/Scan/Save/Quit.
The second window has 3 buttons, Preview/Scan/Done.
The first 'Quit' button only closes the first window but the second windows remains.
Click the first 'Scan', then click the second 'Scan', and back to the first, click 'Save', ok saved.
Click the second 'Done' and click the first 'Quit', ok all closed.
Somewhat wired...
CAN WE MAKE THE TWO IN ONE WINDOW like as the attached?
4. 'Done' button and showing image
Click the first 'Scan', then click the second 'Scan', and click the second 'Done', then the image is shown.
If this is for checking the scan, it is strange because the second window is already closed.
I need to back the first window and click 'Scan' to restart the second window.
The 'exit' at the menu bar of the second window seems the same as the 'Done' button.
Small thing: you are converting .pnm into .png to show, but you need not to do so. The viewnior can display .pnm files.
Please consider for the future version.
Hope you keeping the great job.
Your peasyscan is much smaller than Xsane and promising.
I have some requests to brash up the user interface,
1. Working directory
Your peasyscan uses /root directory as the working directory.
Can we choose the working directory under /mnt/home or somewhere?
Or, we can set the working directory at the same directory of the final save place.
Why not /tmp as the default working directory?
Sometime the work files were left at /root. It they are under the /tmp, they will be erased at shutdown.
2. Default saving image file name
I suppose it will be convenient if the image file name is preset, like '/root/my-documents/clipart' or somewhere.
Keeping the last used file name is more nice.
3. Control window hierarchy
What i am confused is the hierarchy of the GUI windows.
The first window has 4 buttons, Reset/Scan/Save/Quit.
The second window has 3 buttons, Preview/Scan/Done.
The first 'Quit' button only closes the first window but the second windows remains.
Click the first 'Scan', then click the second 'Scan', and back to the first, click 'Save', ok saved.
Click the second 'Done' and click the first 'Quit', ok all closed.
Somewhat wired...
CAN WE MAKE THE TWO IN ONE WINDOW like as the attached?
4. 'Done' button and showing image
Click the first 'Scan', then click the second 'Scan', and click the second 'Done', then the image is shown.
If this is for checking the scan, it is strange because the second window is already closed.
I need to back the first window and click 'Scan' to restart the second window.
The 'exit' at the menu bar of the second window seems the same as the 'Done' button.
Small thing: you are converting .pnm into .png to show, but you need not to do so. The viewnior can display .pnm files.
Please consider for the future version.
Hope you keeping the great job.
- Attachments
-
- peasy_gui.png
- Can the first save window be integrated in the second scan window?
- (7.6 KiB) Downloaded 1642 times
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]
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.Your peasyscan uses /root directory as the working directory.
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.
Showing scanned image
Thanks for the reply, rcrsn!
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.
Its my artwork using gimprcrsn51 wrote:Is your screenie just a mock-up or have you written the actual C code to generate it?
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]
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.
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.
- charlie6
- Posts: 1230
- Joined: Mon 30 Jun 2008, 04:03
- Location: Saint-Gérard / Walloon part of Belgium
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
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
Which driver are you using? Does Xsane work?charlie6 wrote:Is there some specific driver to install?
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.
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 .
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 .
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.
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.
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 :
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
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'
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
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.
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.
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=04b8i 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 !
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=04b8i 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 !
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.
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.