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.
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.
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.
We have been specially including libgen.h to get a version in other
platforms such as macOS and FreeBSD. However, it is dangerous to
make assumptions about which version of basename that we will get.
So this change reverts to asking for the version that modifies the
argument and creates a copy of the arg that we *can* modify.