Remove an extraneous log message.
Ensure that a separate log message is only printed when the preceding
if-statement is true (and its string argument has actually been set).
Both issues were identified from GCC warnings about indentation.
abs() has an integer parameter and returns an integer value. Floating-
point values should be passed to fabs() instead.
In particular, this affected calculations for gain and offset, where a
value with floating-point precision is clearly expected.
The Product Revision Level field in the SCSI inquiry data has a fixed
length of 4 bytes. When copying it as a null-terminated string, place
the null terminator in the correct position; currently the string has
an extra character that is never initialized in memory.
Reduce the length of each string buffer, so it does not extend beyond
the null terminator.
When using Automake variables like sanelib* to install files in a custom
directory, the files are assumed to be platform-independent, unless these
variables contain "exec" in the name. This affects whether the files are
installed during "make install-data" or "make install-exec". It does not
matter whether a suffix like _DATA or _LTLIBRARIES is added to this name.
The packaging scripts for Debian call those Makefile targets separately
and are affected by this behavior. Since the backend libraries themselves
are platform-dependent files, rename these variables to execsanelib*.
JPEG compression improves scan time, and some scanners require it
for high DPI values. But it loses some data, and we already support
toggling it at compile-time.
Add an advanced option so users can decide at scan-time.
Several files already don't have the exception that allows uses of the
code that are additional to the GPL license. I'm no longer comfortable
granting this exception for my subsequent contributions, thus the
exception has been removed.
This was used only on scanners which did not have calibration target
intensity value. All gl841 scanners now have such setting, so the code
can be removed.
True gray mode is not handled correctly by devices: they have bugs that
lead to incorrect LED color being emitted (e.g. dark red) and thus this
feature is completely unusable. At least LiDE 35/40/50, LiDE 60 and LiDE
80 are affected.
Simpy disabling true-gray unfortunately leads to even worse outcome
because the scanner then simply proceeds to perform a color scan.
To work around these problems we do a normal color scan and then produce
gray output based on the color data. This will satisfy the use cases
when correct gray is needed. In cases when it is sufficient to construct
gray from a single color channel, the color filter setting could be
used.
When sensor exposure values are significantly different from each other
the total scan exposure will be too low leading to the device becoming
confused and significantly
At least on LiDE 50 two-table feeding caused unexplained motor spin-up
failures on certain motor exposures. Various register modifications
showed that there's high likelihood on device-side bug. Even the
official drivers don't use proper two-table feeding.
This is not strictly necessary as all known C++ compilers also inject
these types to the global namespace. However this is not guaranteed by
the C++ standard and accordingly some code completion tools don't
support this without additional configuration.
Brightness and contrast adjustments are handled via gamma tables and
thus gamma functionality is required for these settings to have any
effect.
Previously if the device has a sensor with identity gamma
(gamma = {1, 1, 1}), then gamma tables were turned off, consequently
brightness and contrast settings had no effect.
The underlying issue was identified by Gunnar Hjalmarsson
<gunnarhj@ubuntu.com> and STK.
Initial support for Canon R40 SSM scanner with Letter-size ADF.
Hardware provides: gray/color, simplex/duplex, full-width, 300/600dpi
horizontal, with front mirrored horizontally.
This is separate commit because the previous commit introducing this
warning is completely unrelated and would not benefit from this change
being included.
Fixes:
genesys/utilities.h:229:23: error: invalid initialization of non-const reference of type 'std::basic_ios<char>&' from an rvalue of type '<brace-enclosed initializer list>'
stream_{stream}
^
genesys/image_pipeline.cpp:715:19: error: invalid initialization of non-const reference of type 'genesys::ImagePipelineNode&' from an rvalue of type '<brace-enclosed initializer list>'
source_{source}
^
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
This commit fixes a regression introduced in 1.0.25 for ADF scanners:
the scanning page-width was always set to a fixed value,
ignoring the page-width provided by the frontend.
This commit restores the behaviour that allows changing the page-width.
Signed-off-by: Peter Marschall <peter@adpm.de>
In the option descriptor definitions of tl_x, tl_y, br_x & br_y
make sure the the maximal value of the range is not smaller than
the minimal value.
Signed-off-by: Peter Marschall <peter@adpm.de>
Sent by Nakamura Iwao via sane-devel mailing list on Nov, 29th. I only
sorted the epson2 descriptions alphabetically.
Subject: [sane-devel] Additional model support for epson2 / epsonds backend
Message-ID: <TYCPR01MB7872CDD0461B7572D5DBD7A8EB669@TYCPR01MB7872.jpnprd01.prod.outlook.com>