[sane-devel] pixma backend: -x/y auto advertised but not available / how to crop?
m. allan noah
kitno455 at gmail.com
Sat Apr 29 01:49:10 UTC 2017
That 'auto' string is put there by scanimage, when it finds an option
with the SANE_CAP_AUTOMATIC capability set. Unfortunately, scanimage
has some special handling for the x/y/t/l parameters. It appears that
-l and -t will properly parse the 'auto' string, but -x and -y will
not. This is a bug in scanimage, specifically in parse_vector().
If the pixma devices are unable to detect paper width in hardware, the
SANE_CAP_AUTOMATIC cap should be removed from those options. Or, the
pixma backend could be extended to use sanei_magic library, which
other backends use to add features like deskew and crop.
Outside of modifying sane-backends, you might look at the program
unpaper for post-processing the images.
On Thu, Apr 27, 2017 at 5:05 PM, Manuel Reiter <manuel at reiter.pm> wrote:
> Nobody? I found this old discussion which seems to suggest the pixma devices don't support auto-detection:
> If that's indeed the case, may I suggest updating the pixma backend so that it doesn't advertise capabilities that don't exist?
> Also, I'd still appreciate suggestion for a scriptable approach to achieve this functionality.
> Am 11.04.2017 um 16:44 schrieb Manuel Reiter:
>> I'm using saned with a Pixma MP610 all-in-one on a Raspberry Pi 3 running an up-to-date Rasbian Jessie. scanimage --help shows me the following options for Geometry:
>> Options specific to device `net:localhost:pixma:04A91725_414EE7':
>> -l auto|0..216.069mm 
>> Top-left x position of scan area.
>> -t auto|0..297.011mm 
>> Top-left y position of scan area.
>> -x auto|0..216.069mm [216.069]
>> Width of scan-area.
>> -y auto|0..297.011mm [297.011]
>> Height of scan-area.
>> However, trying to actually use "-x auto" results in an error:
>> reiter at hive:~ $ scanimage -d net:localhost:pixma --mode Color \
>> --resolution 300 -l auto -t auto -x auto -y auto > /dev/null
>> scanimage: option --x: bad option value (rest of option: auto)
>> Is this a bug or an error on my part?
>> I intend to use this scanner for a document management system and expect to scan quite a number of non-full-size documents. If x/y auto is indeed not available, what would be a good way to automatically crop my scans? The included (Mac) Software actually does a decent job so it seems to be possible.
>> Thanks in advance for your answers!
>> sane-devel mailing list: sane-devel at lists.alioth.debian.org
>> Unsubscribe: Send mail with subject "unsubscribe your_password"
>> to sane-devel-request at lists.alioth.debian.org
> sane-devel mailing list: sane-devel at lists.alioth.debian.org
> Unsubscribe: Send mail with subject "unsubscribe your_password"
> to sane-devel-request at lists.alioth.debian.org
"well, I stand up next to a mountain- and I chop it down with the edge
of my hand"
More information about the sane-devel