Wykres commitów

113 Commity (f6594ed040af8155e6682001ce61ac5d720e8756)

Autor SHA1 Wiadomość Data
Ralph Little a0ca5a4fc4 Resolve "[hp5590] Read only values aren't accessible via CLI options (unrecognized option)" 2022-02-21 22:13:28 +00:00
Ordissimo d25f5db739 Add format pdf. 2021-09-22 15:14:15 +00:00
Andrew Sayers a6ffa6c8f8 scanimage: mention when an option is advanced 2021-03-30 11:51:21 +01:00
Olaf Meeuwissen e79adde8b2
Use URL to refer users to copies of the GPL and LGPL
With the exception of use in three quotes as well as our inlcuded copy
of the GPL, all use of the Free Software Foundation's postal address
has been removed.

Re #320.
2021-02-12 17:41:38 +09:00
James Ring b4be10c5a2 Fix crash in scanimage when must_buffer is true
Fixes https://gitlab.com/sane-project/backends/-/issues/408.
2020-12-26 14:04:26 -08:00
James Ring aa228faa13 fix small memory leak in scanimage option processing 2020-12-07 14:55:32 -08:00
Ralph Little bc64c8f549 scanimage: check also for negative word_list length which is nonsensical. 2020-10-18 09:51:35 -07:00
Ralph Little 968add6706 scanimage: added checks for null constraints.
We have seen this from buggy backends that present NULL for constraint
string_lists. This is probably illegal behaviour from backends but we
don't want to crash.
2020-10-06 20:16:13 -07:00
Ralph Little 180ecf7b41 scanimage: revert previous range change.
It is not settled that this change is favourable and is probably out of scope for this issue.
I will leave it for the moment.
2020-03-05 09:18:20 -08:00
Ralph Little 4948130f7c scanimage: various small corrections and little changes to enhance clarity. 2020-03-01 23:31:23 -08:00
Ralph Little 385543519b scanimage,hp5400: added option checking for hp5400 and rationalised scanimage help
h5400 now checks validity of -l, -t, -x and -y and auto selects a supported resolution.
scanimage now shows the full range for -x and -y despite other selections.
2020-03-01 22:53:48 -08:00
Olaf Meeuwissen 7f97712491 scanimage: Combine conditions to reduce nesting 2019-12-29 17:37:17 +09:00
Olaf Meeuwissen 4fbb5d2f1b scanimage: Use destination size to limit strncpy() 2019-12-28 19:05:01 +09:00
Olaf Meeuwissen df114df05f scanimage: Replace string length computations by temporary strings
This creates temporary strings that correspond to the colon-delimited
username and password that are read from file in `auth_callback()`.
The null-terminated strings are used directly to determine lengths.
2019-12-28 19:04:52 +09:00
Olaf Meeuwissen 6682223b26 scanimage: Improve readability of auth_callback implementation
Rather than repeatedly calling `strchr`, use descriptive variables to
hold the result.
2019-12-28 19:03:11 +09:00
Olaf Meeuwissen 5e6a111ffa scanimage: Un-word-wrap auth_callback to improve readability
This is one of those cases where word-wrapping to less than 80 or so
characters isn't helpful in understanding the code.
2019-12-28 18:03:00 +09:00
Povilas Kanapickas 9472dce5f7 scanimage: Fix 32-bit overflow when calculating total bytes to transfer 2019-11-10 13:27:53 +02:00
Olaf Meeuwissen e42e3bc849 scanimage: Fix misleading fall through annotation
The `scanimage_exit()` call exits the program.
2019-08-11 10:23:29 +09:00
Povilas Kanapickas e40596c2a5 Fix -Wimplicit-fallthrough warnings by adding standard annotations 2019-06-30 11:58:32 +03:00
Olaf Meeuwissen 7af0d47e29 Keep warning out of redirected image data. Fixes testsuite 2019-06-30 12:45:03 +09:00
Povilas Kanapickas 728de89d71 scanimage: Guess --format from --output-file if possible 2019-05-11 11:45:27 +03:00
Povilas Kanapickas 86e917b04b scanimage: Prevent --output-file and --batch to be used together 2019-05-11 11:45:27 +03:00
Povilas Kanapickas 7f4944f0a7 scanimage: Warn when output format is not set 2019-05-11 11:45:27 +03:00
Povilas Kanapickas 877cc29d88 scanimage: Raise an error if --format option is an unknown format 2019-05-11 11:45:27 +03:00
Povilas Kanapickas 5dbd51d1ec scanimage: Allow specification of the output path via option 2019-04-28 23:27:59 +03:00
Olaf Meeuwissen 23891a2646 .editorconfig: trim trailing whitespace 2017-05-29 21:14:29 +09:00
Aaron Muir Hamilton 801558f959 Write density (resolution) JFIF header information with JPEG files. 2017-05-04 18:35:05 +09:00
Olaf Meeuwissen b219bc2c73 Merge branch 'icc-profiles' 2017-05-04 18:26:55 +09:00
Olaf Meeuwissen adebd37b5c Fix [-Wpointer-arith] compiler warnings 2017-04-30 20:00:28 +09:00
Aaron Muir Hamilton c3903cc476 Avoid attaching grayscale ICC profiles to rgb images, or vice-versa.
If the ICC profile added does not match the colour format of the
  image, libpng will abort. This can leave the scanner motors in an
  incorrect state and possibly cause permanent damage.
2017-04-30 18:54:39 +09:00
Aaron Muir Hamilton a907b61bd5 Add ICC profile embedding for PNG output. 2017-04-30 18:54:28 +09:00
Aaron Muir Hamilton a0321d2a92 Include physical resolution (pHYs section) in PNG output. 2017-04-27 21:39:29 +09:00
Olaf Meeuwissen 469dc738aa Only swap 16-bit PNG bytes on machines that are not big-endian
The SANE API specifies that image bytes are in machine native order.
2017-04-27 21:17:34 +09:00
Aaron Muir Hamilton 28eb09eec4 Swap bytes in 16-bit PNGs, because PNG is big-endian. 2017-04-27 20:50:18 +09:00
Ruslan Nabioullin be7af68357 Fixed scanning status messages. Fixes 313411 2016-07-06 20:39:09 +09:00
Olaf Meeuwissen d3d5dc3da0 Update to autoconf-2.69
This gets rid of a number of obsoleted macros and replaces RETSIGTYPE
with a void literal which can be assumed for C89 and later.

This changeset was prepared using autoupdate and modified to get rid of
whitespace and doubled [] changes.  Changes to acinclude.m4 were added
by hand.
2016-06-13 22:05:34 +09:00
Olaf Meeuwissen 4b825b7d87 Fix scanimage pixel bit depth reporting
The bytes_per_line value may include padding bytes which leads to
incorrect results for small values of pixels_per_line.
2015-09-19 13:39:37 -04:00
Olaf Meeuwissen 002fea134a Align JPEG format command-line option behaviour with TIFF 2015-09-19 12:02:57 -04:00
Matteo Croce bc698d4329 add JPEG support to scanimage 2015-09-19 12:02:57 -04:00
Matteo Croce c83123ee46 add PNG format to scanimage 2015-09-19 12:02:57 -04:00
Rolf Bensch 4a6d0be34e remove atexit() function
- in some cases atexit() doesn't work with libusb-compat
  - all exit() functions are replaced by scanimage_exit()
  - scanimage_exit() has a new parameter (exit status)
2015-08-20 23:34:33 +02:00
m. allan noah b973a9c49f change exit status of scanimage
If we have successfully scanned at least one image
during a batch scan, don't return SANE_STATUS_NO_DOCS.
Code by Jeff Breidenbach jeff@jab.org
2014-07-14 20:09:02 -04:00
m. allan noah 0bb6ae706d add batch-print option to scanimage
Enables better interoperability with tesseract.
Code by Jeff Breidenbach jeff@jab.org
2014-07-14 20:03:36 -04:00
Mark Buda c591d2b7da Correction of some spelling/grammatical errors in source code 2014-05-15 22:04:37 -04:00
Nils Philippsen 8082a42ec4 avoid using string formats insecurely with "-f"
In the process, simplify processing the device list format: don't copy
the format string for writing \0 into it, just iterate over chunks in
the original string.
2013-12-04 15:04:12 +01:00
Stéphane Voltz ce90b61894 add test to protect scanimage from incorrect group options 2013-06-19 17:28:04 +02:00
Chris Bagwell 5061c2d5b2 More mingw portability updates.
Add check for winsock2.h for socket.h replancement. Also, use this
check to add ws2_32 library. Also, switch all winsock.h references
to winsock2.h.

Add check for getuid and getpass; which are not on mingw.

Add a syslog() replacement that is basically a print(). This
is also used by vsyslog() replacement.

Comment out parts of replacement sigprocmask.c on mingw.

To support these configure.in changes, I need to rebuild all
related files with autoconf 2.68 and libtool 2.4. Hand ported
our sane-backend specific changes to newer ltmain.sh.
2011-11-06 12:40:00 -06:00
Chris Bagwell 9bdff1dbdf mingw32 compile fixes
The following updates were made to all directories but backends.
That still needs work. There are also still some pthread issues
and syslog is missing.

 Windows doesn't support SIGHUP or SIGPIPE so make that optional.
 Only include socket header files when sys/socket.h is detected.
 Use winsock.h on windows.
 Only include syslog.h when vsyslog() was detect by configure.
 Skip FD_CLOEXEC when not supported by OS (not defined).
 Only include sys/ioctl.h on platforms that define it.
2011-11-05 11:19:34 -05:00
Olaf Meeuwissen 738b153eb6 Plug a memory in batch mode
scanimage allocates a new buffer for each page scanned without ever
releasing it. Buffer is 32 kiB by default.
2011-06-30 20:56:52 +02:00
Stéphane Voltz 4d0cd3c5b1 add -A/--all-options to scanimage for exposing all control options of a
backend
2010-11-06 08:00:37 +01:00