Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-m Color hangs #19

Closed
prismplex opened this issue Mar 6, 2021 · 7 comments
Closed

-m Color hangs #19

prismplex opened this issue Mar 6, 2021 · 7 comments

Comments

@prismplex
Copy link

prismplex commented Mar 6, 2021

First of all thank you for this great script.
Currently using it with a ix1500 and a raspberry pi running ubuntu. All color modes work as expected except -m Color.
Script output:

Scanning...
scanadf: rounded value of page-height from 9999 to 3012.9
scanadf: rounded value of page-width from 9999 to 221.121
scanadf: rounded value of br-x from 9999 to 221.121
scanadf: rounded value of br-y from 9999 to 3012.9
Scanned document /tmp/scan.UFUoyVqpFj/scan-0001
Scanned document /tmp/scan.UFUoyVqpFj/scan-0002
Scanned 2 pages

After that nothing happens, the script hangs.
Verbose mode on:

Scanning...
scanadf: rounded value of page-height from 9999 to 3012.9
scanadf: rounded value of page-width from 9999 to 221.121
scanadf: rounded value of br-x from 9999 to 221.121
scanadf: rounded value of br-y from 9999 to 3012.9
Scanned document /tmp/scan.7yhnGAIvQF/scan-0001
scan_perpage:
scan_perpage: -------------------------------------------------------------------------------
scan_perpage: Post-processing scanned page /tmp/scan.7yhnGAIvQF/scan-0001, deskew=0, searchable=0...
scan_perpage: -------------------------------------------------------------------------------
Scanned document /tmp/scan.7yhnGAIvQF/scan-0002
Scanned 2 pages
scan_perpage: /tmp/scan.7yhnGAIvQF/scan-0001 has 18.072 % white
scan_perpage: Converting image data to pdf...
scan_perpage: Using page options: -equalpixels -dpi=300 -noturn

The script i used:

#!/bin/sh
now=`date +"%Y-%m-%d-%H%M"`
/home/ubuntu/sane-scan-pdf/scan -d -v -r 300 -m Color --crop --skip-empty-pages -o /home/ubuntu/scans/scan-$now.pdf

Does somebody have an idea how to solve this?
Thank you!

@rocketraman
Copy link
Owner

Are you sure it is hung, or is it just taking a while? Even on my desktop machine, pnmtops takes a while to run when in color mode at a resolution of 300.

As an experiment, try it with -r 75, which should be significantly faster.

@prismplex
Copy link
Author

prismplex commented Mar 7, 2021

Wow, thank you, you are right. But why does it take so long? Any argument to speed this up (besides reducing the quality and going with a lower dpi)?

@rocketraman
Copy link
Owner

I don't know TBH. I did some googling but nothing of note comes up.

@rocketraman
Copy link
Owner

Sent an email to the maintainer of netpbm. Will update this issue if I hear back.

@rocketraman
Copy link
Owner

@prismplex I think I figured out the problem... or at least a symptom of the problem (I'm still waiting to hear back from the maintainer of netpbm about his ideas for the root cause). Please try the latest master version and see if that works better for you.

@rocketraman
Copy link
Owner

FYI The underlying issue, which doesn't affect the workaround now on master, seems to be with ghostscript, not with netpbm. I've created this issue on the Ghostscript bug tracker: https://bugs.ghostscript.com/show_bug.cgi?id=703686.

@prismplex
Copy link
Author

Thank you very much! The workaround works flawlessly. Scanning is much much much faster! Cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants