hplip-lineart.patch 1.0 KB

1234567891011121314
  1. diff -up hplip-3.14.6/scan.py.lineart hplip-3.14.6/scan.py
  2. --- hplip-3.14.6/scan.py.lineart 2014-07-23 12:30:52.361517852 +0100
  3. +++ hplip-3.14.6/scan.py 2014-07-23 12:32:17.052940000 +0100
  4. @@ -977,8 +977,8 @@ try:
  5. try:
  6. pixels_per_line = bytes_per_line * 8 # Calculation of pixels_per_line for Lineart must be 8 time of bytes_per_line
  7. # Otherwise, scanned image will be corrupted (slanted)
  8. - im = Image.frombuffer('RGBA', (pixels_per_line, lines), buffer.read(),
  9. - 'raw', 'RGBA', 0, 1).convert('L')
  10. + im = Image.frombuffer('1', (pixels_per_line, lines), buffer.read(),
  11. + 'raw', '1', 0, 1).convert('L')
  12. except ValueError:
  13. log.error("Did not read enough data from scanner (I/O Error?)")
  14. sys.exit(1)