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>
Fujitsu has transfered their line of scanners to Ricoh, initially
keeping the same USB VID and PID. So we duplicate all current
models into a Ricoh section.
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.
Resolve "sane terminates on flatbed-scanning (Xerox 3225, xerox_mfp) with : Not a JPEG file: starts with 0x00 0x00"
Closes#410
See merge request sane-project/backends!567
Two changes were made recently for the batch processing component
in scanimage. It's not too bad, just a couple of unused local vars.
Conflict was between some refactoring that I did and a change to
the processing for --batch-prompt.