Halftone and lineart mode do not work properly except for a
resolution of 600 dpi. The very last part of a scanned document is
missing and displayed as black stripe. This problem was found with a
Samsung SCX-4521F, but is assumed to affect other devices, too.
Decode the data received from the device in halftone and lineart mode
to fix this problem.
This patch was tested with a Samsung SCX-4521F device for all
resolutions supported by the device with color, grayscale, lineart
and halftone mode.
No regression test with other devices supported by the xerox_mfp
driver was done because of lack of devices.
The acquisition with the xerox_mfp driver works almost out of the box
for the Samsung SCX-4521F but the process stops just before the end
of the document until an USB transfer timeout expires. The very last
part of the scanned document is missing then.
Do not request more data from the device than available for the last
USB transfer to overcome this problem and to be conform with the
properties of the vendor driver.
The driver was tested for all resolutions supported by the device
with color and grayscale mode.
No regression test with other devices supported by the xerox_mfp
driver was done because of lack of devices.
jpeg_crop_scanline will adjust the x offset and the width of the image
to make it line up with the nearest iMCU boundary.
Before, this was not taken into account and it would make SANE
potentially allocate a too small buffer for the final image.
This would lead to segfaults because libjpeg would try to write outside
of the allocated memory region as it assumes that the buffer was
allocated with the new cinfo.output_width size after cropping.
Works OK, but, when scanning in automatic feeder mode, only the first page is scanned:
e.g. if run
SANE_DEBUG_XEROX_MFP=4 skanlite
skanlite thinks that scanning has been finished after the first page, but the scanner continues to work and debug messages about reading data from the scanner (sane_xerox_mfp_read: <..>) continue to be printed.
Signed-off-by: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
The group options currently do not have names set. Since only the title
is supposed to be valid for group options, this isn't a violation of
the SANE standard. Regardless, it causes scanimage (and maybe other
frontends) to skip them. Add empty name values so that they can be
processed properly.
Before:
Options specific to device `epsonds:net:n.n.n.n':
Standard:
--source Flatbed|ADF Front|ADF Duplex [Flatbed]
Selects the scan source (such as a document-feeder).
--mode Lineart|Gray|Color [Color]
Selects the scan mode (e.g., lineart, monochrome, or color).
--depth 1|8bit [8]
Number of bits per sample, typical values are 1 for "line-art" and 8
for multibit scans.
--resolution 75|150|300|600|1200dpi [75]
Sets the resolution of the scanned image.
-l 0..215.9mm [0]
Top-left x position of scan area.
-t 0..297.18mm [0]
Top-left y position of scan area.
-x 0..215.9mm [215.9]
Width of scan-area.
-y 0..297.18mm [297.18]
Height of scan-area.
--eject [inactive]
Eject the sheet in the ADF
--load [inactive]
Load a sheet in the ADF
--adf-skew[=(yes|no)] [inactive]
Enables ADF skew correction
--adf-crp[=(yes|no)] [inactive]
Enables ADF auto cropping
After:
Options specific to device `epsonds:net:n.n.n.n':
Standard:
--source Flatbed|ADF Front|ADF Duplex [Flatbed]
Selects the scan source (such as a document-feeder).
--mode Lineart|Gray|Color [Color]
Selects the scan mode (e.g., lineart, monochrome, or color).
--depth 1|8bit [8]
Number of bits per sample, typical values are 1 for "line-art" and 8
for multibit scans.
--resolution 75|150|300|600|1200dpi [75]
Sets the resolution of the scanned image.
Geometry:
-l 0..215.9mm [0]
Top-left x position of scan area.
-t 0..297.18mm [0]
Top-left y position of scan area.
-x 0..215.9mm [215.9]
Width of scan-area.
-y 0..297.18mm [297.18]
Height of scan-area.
Optional equipment:
--eject [inactive]
Eject the sheet in the ADF
--load [inactive]
Load a sheet in the ADF
--adf-skew[=(yes|no)] [inactive]
Enables ADF skew correction
--adf-crp[=(yes|no)] [inactive]
Enables ADF auto cropping
The OPT_ADF_CRP (adf-crp) option is detectable from the hardware and is
settable as an option, but can't be queried. This appears to just be an
oversight, so add it to the list of handled options.
We always know the USB vendor and product ids for USB devices and
there are multiple entries with the same SCSI details shared by
different USB models. We should pick the correct one at least to
get the right model name to the user.
Scanjet 8300 has an ADF port but does not necessarily have an ADF
fitted. In the test case, there is a lightbox instead. Trying to
reset/probe for an ADF that isn't there is futile.
- add complete support for imprinters on X10C (#585)
The vast majority of the work here was originally done in !706 by
Charles Quarra. I had some merge conflicts, and it was easier to
pull all his work into a patch and apply it myself.
The only changes I made were minor updates to comments, and adding
an imprinter group option. Sorry for the loss of attribution, and
thanks Charles!
Add support for Canon imageRUNNER 1018/1022/1023 models, which all share the
same USB PID. Add it as a copy of MF6500.
Tested with an iR1022A model. Flatbed and ADF both work correctly.
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Tested with Avision AD345F model number DL-1802B.
Flatbed and ADF duplex scanning available.
Known limitation: ADF scanning is only capable to scan one sheet
at a time via automatic feeder. Providing 2+ sheets breaks backend
and scanner needs to be rebooted.
Signed-off-by: Nikolai Kostrigin <nickel@altlinux.org>
Tested-by: Mikhail Chernonog <snowmix@altlinux.org>