You are not logged in.

#1 2019-02-06 20:52:56

JonnyRobbie
Member
Registered: 2015-04-28
Posts: 148

[solved] Scanner V600 doesn't scan in 16bpc mode

I have a scanner Epson V600. Installed `iscan`, `iscan-data` from repos and `iscan-plugin-gt-x820` from AUR.

$ scanimage -h -d 'epkowa:interpreter:003:020'
Usage: scanimage [OPTION]...

Start image acquisition on a scanner device and write image data to
standard output.

Parameters are separated by a blank from single-character options (e.g.
-d epson) and by a "=" from multi-character options (e.g. --device-name=epson).
-d, --device-name=DEVICE   use a given scanner device (e.g. hp:/dev/scanner)
    --format=pnm|tiff|png|jpeg  file format of output file
-i, --icc-profile=PROFILE  include this ICC profile into TIFF file
-L, --list-devices         show available scanner devices
-f, --formatted-device-list=FORMAT similar to -L, but the FORMAT of the output
                           can be specified: %d (device name), %v (vendor),
                           %m (model), %t (type), %i (index number), and
                           %n (newline)
-b, --batch[=FORMAT]       working in batch mode, FORMAT is `out%d.pnm' `out%d.tif'
                           `out%d.png' or `out%d.jpg' by default depending on --format
    --batch-start=#        page number to start naming files with
    --batch-count=#        how many pages to scan in batch mode
    --batch-increment=#    increase page number in filename by #
    --batch-double         increment page number by two, same as
                           --batch-increment=2
    --batch-print          print image filenames to stdout
    --batch-prompt         ask for pressing a key before scanning a page
    --accept-md5-only      only accept authorization requests using md5
-p, --progress             print progress messages
-n, --dont-scan            only set options, don't actually scan
-T, --test                 test backend thoroughly
-A, --all-options          list all available backend options
-h, --help                 display this help message and exit
-v, --verbose              give even more status messages
-B, --buffer-size=#        change input buffer size (in kB, default 32)
-V, --version              print version information

Options specific to device `epkowa:interpreter:003:020':
  Scan Mode:
    --mode Binary|Gray|Color [Color]
        Selects the scan mode (e.g., lineart, monochrome, or color).
    --depth 8|16 [8]
        Number of bits per sample, typical values are 1 for "line-art" and 8
        for multibit scans.
    --halftoning None|Halftone A (Hard Tone)|Halftone B (Soft Tone)|Halftone C (Net Screen) [inactive]
        Selects the halftone.
    --dropout None|Red|Green|Blue [inactive]
        Selects the dropout.
    --brightness-method iscan|gimp [iscan]
        Selects a method to change the brightness of the acquired image.
    --brightness -100..100 (in steps of 1) [0]
        Controls the brightness of the acquired image.
    --contrast -100..100 (in steps of 1) [0]
        Controls the contrast of the acquired image.
    --sharpness -2..2 [inactive]
        
    --gamma-correction User defined (Gamma=1.0)|User defined (Gamma=1.8) [User defined (Gamma=1.8)]
        Selects the gamma correction value from a list of pre-defined devices
        or the user defined table, which can be downloaded to the scanner
    --color-correction User defined [inactive]
        Sets the color correction table for the selected output device.
    --resolution 400|800|1600|3200dpi [400]
        Sets the resolution of the scanned image.
    --x-resolution 200|400|600|800|1200|1600|3200|6400dpi [200]
        Sets the horizontal resolution of the scanned image.
    --y-resolution 200|240|320|400|600|800|1200|1600|3200|4800|6400dpi [320]
        Sets the vertical resolution of the scanned image.
    --threshold 0..255 [inactive]
        Select minimum-brightness to get a white point
  Advanced:
    --mirror[=(yes|no)] [inactive]
        Mirror the image.
    --speed[=(yes|no)] [no]
        Determines the speed at which the scan proceeds.
    --auto-area-segmentation[=(yes|no)] [inactive]
        
    --short-resolution[=(yes|no)] [no]
        Display short resolution list
    --zoom 50..200 [inactive]
        Defines the zoom factor the scanner will use
    --red-gamma-table 0..255,...
        Gamma-correction table for the red band.
    --green-gamma-table 0..255,...
        Gamma-correction table for the green band.
    --blue-gamma-table 0..255,...
        Gamma-correction table for the blue band.
    --wait-for-button[=(yes|no)] [no]
        After sending the scan command, wait until the button on the scanner
        is pressed to actually start the scan process.
  Color correction coefficients:
    --cct-1 -2..2 [1.2578]
        Controls red level
    --cct-2 -2..2 [-0.213989]
        Adds to red based on green level
    --cct-3 -2..2 [-0.0437927]
        Adds to red based on blue level
    --cct-4 -2..2 [-0.193893]
        Adds to green based on red level
    --cct-5 -2..2 [1.2856]
        Controls green level
    --cct-6 -2..2 [-0.0916901]
        Adds to green based on blue level
    --cct-7 -2..2 [-0.0257874]
        Adds to blue based on red level
    --cct-8 -2..2 [-0.264191]
        Adds to blue based on green level
    --cct-9 -2..2 [1.28999]
        Control blue level
  Preview:
    --preview[=(yes|no)] [no]
        Request a preview-quality scan.
    --preview-speed[=(yes|no)] [no]
        
  Geometry:
    --scan-area Maximum|A4|A5 Landscape|A5 Portrait|B5|Letter|Executive|CD [Maximum]
        Select an area to scan based on well-known media sizes.
    -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.
    --quick-format Maximum|A4|A5 Landscape|A5 Portrait|B5|Letter|Executive|CD [Maximum]
        Select an area to scan based on well-known media sizes. (DEPRECATED)
  Optional equipment:
    --source Flatbed|Transparency Unit [Flatbed]
        Selects the scan source (such as a document-feeder).
    --auto-eject[=(yes|no)] [inactive]
        Eject document after scanning
    --film-type Positive Film|Negative Film [inactive]
        
    --focus-position Focus on glass|Focus 2.5mm above glass [inactive]
        Sets the focus position to either the glass or 2.5mm above the glass
    --bay  1 | 2 | 3 | 4 | 5 | 6  [inactive]
        Select bay to scan
    --eject [inactive]
        Eject the sheet in the ADF
    --adf-mode Simplex|Duplex [inactive]
        Selects the ADF mode (simplex/duplex)
    --detect-doc-size[=(yes|no)] [inactive]
        Activates document size auto-detection.  The scan area will be set to
        match the detected document size.
    --adf-auto-scan[=(yes|no)] [inactive]
        Skips per sheet device setup for faster throughput.
    --double-feed-detection-sensitivity None|Low|High [inactive]
        Sets the sensitivity with which multi-sheet page feeds are detected
        and reported as errors.
    --deskew[=(yes|no)] [inactive]
        Rotate image so it appears upright.
    --autocrop[=(yes|no)] [inactive]
        Determines empty margins in the scanned image and removes them.  This
        normally reduces the image to the size of the original document but may
        remove more.
    --calibrate [inactive]
        Performs color matching to make sure that the document's color tones
        are scanned correctly.
    --clean [inactive]
        Cleans the scanners reading section.

Type ``scanimage --help -d DEVICE'' to get list of all options for DEVICE.

List of available devices:
    epkowa:interpreter:003:021
    utsushi:esci:usb:/sys/devices/pci0000:00/0000:00:1a.7/usb9/9-5/9-5:1.0
    utsushi:esci:networkscan://192.168.0.2:1865
    utsushi:sane::epkowa:usb:0x04b8:0x0848

Trying simple `scanimage` with default depth works fine:

$ scanimage --verbose -d 'epkowa:interpreter:003:021' --format=tiff --source 'Transparency Unit' > test.tiff
scanimage: scanning image of size 808x3052 pixels at 24 bits/pixel
scanimage: acquiring RGB frame
scanimage: min/max graylevel value = 0/254
scanimage: read 7398048 bytes in total

But setting the depth to 16bpc results in a crash?:

$ scanimage --verbose -d 'epkowa:interpreter:003:021' --format=tiff --source 'Transparency Unit' --depth 16 > test.tiff
scanimage: scanning image of size 808x3052 pixels at 48 bits/pixel
scanimage: acquiring RGB frame
$ hexdump test.tiff
0000000 4949 002a 0008 0000 0010 00fe 0004 0001
0000010 0000 0000 0000 0100 0003 0001 0000 0328
0000020 0000 0101 0003 0001 0000 0bec 0000 0102
0000030 0003 0003 0000 00ce 0000 0103 0003 0001
0000040 0000 0001 0000 0106 0003 0001 0000 0002
0000050 0000 0111 0004 0001 0000 00f0 0000 0112
0000060 0003 0001 0000 0001 0000 0115 0003 0001
0000070 0000 0003 0000 0116 0004 0001 0000 0bec
0000080 0000 0117 0004 0001 0000 c540 00e1 0118
0000090 0003 0003 0000 00d4 0000 0119 0003 0003
00000a0 0000 00da 0000 011a 0005 0001 0000 00e0
00000b0 0000 011b 0005 0001 0000 00e8 0000 0128
00000c0 0003 0001 0000 0002 0000 0000 0000 0010
00000d0 0010 0010 0000 0000 0000 ffff ffff ffff
00000e0 0190 0000 0001 0000 0190 0000 0001 0000
00000f0

scanimage does not seem to segfault, but the output image is garbage and the scanner seems to be stuck and needs restart. I've tried xsane and skanlite, but since they all (presumably) work with sane, it didn't help.

Has anyone managed to make 16bpc transparency (analog film negative) work?

$ scanimage -V
scanimage (sane-backends) 1.0.27; backend version 1.0.27
$ uname -roms
Linux 4.20.6-arch1-1-ARCH x86_64 GNU/Linux

Last edited by JonnyRobbie (2019-03-08 10:19:10)

Offline

#2 2019-02-07 14:49:12

eda2z
Member
From: Woodstock, IL
Registered: 2015-04-21
Posts: 29

Re: [solved] Scanner V600 doesn't scan in 16bpc mode

Over the past year I have scanned almost 7k prints, slides and negatives on my V600 -- it helps to be retired. When I started I quickly gave up on scan image. I tried out vuescan and after seeing the results I purchased a license and never looked back.

Offline

#3 2019-02-07 16:40:35

JonnyRobbie
Member
Registered: 2015-04-28
Posts: 148

Re: [solved] Scanner V600 doesn't scan in 16bpc mode

I'm using iscan only as a backend for sane. I don't really want to use epson's imagescan as a frontend. I just need 16bpc in sane/xsane. Are your scans in 16bpc?

Offline

#4 2019-02-08 15:06:07

eda2z
Member
From: Woodstock, IL
Registered: 2015-04-21
Posts: 29

Re: [solved] Scanner V600 doesn't scan in 16bpc mode

My scans are not 16-bit but according to the docs for vuescan they do support 16-bit. Note that this is not imagescan but a different piece of software. It is proprietary but is in the AUR. Without purchasing a license you get a watermarked result.

Offline

#5 2019-03-08 10:18:48

JonnyRobbie
Member
Registered: 2015-04-28
Posts: 148

Re: [solved] Scanner V600 doesn't scan in 16bpc mode

So I was looking more into it. I know that the scanner supports 16bpc on win+mac, so the hardware is capable of that. I've tried running the scan with some more debug info. The output being quite substantial is hosted here. The most important being the last line:

$ SANE_DEBUG_EPKOWA=HEX scanimage --verbose --format=pnm --source 'Transparency Unit' --depth 16 > test16bpcV2.pnm
...
dip-obj.c:572: [epkowa][F] failed: require (8 == buf->ctx.depth)

So I looked into the source of iscan and here's what I found:

$ cat backend/dip-obj.c
...
/*! \todo Add support for 16 bit color values (#816).
 */
void
dip_apply_color_profile (const void *self, const buffer *buf,
                         const double profile[9])
{
...
require (8 == buf->ctx.depth);
...
}
...

Shaking my head at this point, it seems like while the hardware might support 16bpc, Epson could not be arsed enough to implement that in Linux. (Worth noting that 3rd party proprietary Vuescan does support 16bpc, I've tried that with the free watermarked version).

It seemed like I just should resign on the futility and move on, but this miraculous find happened: https://github.com/hean01/iscan. Someone had the exact same problem more then five years ago, but knew enough of C to implement a patch. So I've checked out iscan using ABS, formatted a patch from hean01's changes:

--- backend/channel-usb.c
+++ backend/channel-usb.c
@@ -91,6 +91,7 @@ static ssize_t channel_usb_send (channel *, const void *,
 static ssize_t channel_usb_recv (channel *, void *,
                                  size_t, SANE_Status *);
 
+static size_t channel_usb_max_request_size (const channel *);
 
 channel *
 channel_usb_ctor (channel *self, const char *dev_name, SANE_Status *status)
@@ -119,7 +120,7 @@ channel_usb_ctor (channel *self, const char *dev_name, SANE_Status *status)
   self->send = channel_usb_send;
   self->recv = channel_usb_recv;
 
-  self->max_size = 128 * 1024;
+  self->max_request_size = channel_usb_max_request_size;
 
   return self;
 }
@@ -265,9 +266,6 @@ channel_interpreter_ctor (channel *self, const char *dev_name,
           self->dtor = channel_interpreter_dtor;
         }
     }
-
-  self->max_size = 32 * 1024;
-
   return self;
 }
 
@@ -283,3 +281,10 @@ channel_interpreter_dtor (channel *self)
   self->dtor = channel_dtor;
   return self->dtor (self);
 }
+
+static size_t
+channel_usb_max_request_size (const channel *self)
+{
+  return (self->interpreter ? 32 : 128) * 1024;
+}
+
--- backend/dip-obj.c
+++ backend/dip-obj.c
@@ -555,44 +555,70 @@ dip_change_GRB_to_RGB (const void *self, const buffer *buf)
   return;
 }
 
-/*! \todo Add support for 16 bit color values (#816).
- */
 void
 dip_apply_color_profile (const void *self, const buffer *buf,
                          const double profile[9])
 {
   SANE_Int i;
-  SANE_Byte *r_buf, *g_buf, *b_buf;
   double red, grn, blu;
 
-  SANE_Byte *data;
   SANE_Int size;
 
   require (dip == self && buf && profile);
-  require (8 == buf->ctx.depth);
+  require (buf->ctx.depth == 8 || buf->ctx.depth == 16);
 
   if (SANE_FRAME_RGB != buf->ctx.format)
     return;
 
-  data = buf->ptr;
-  size = buf->end - buf->ptr;
+  if (buf->ctx.depth == 8)
+  {
+    SANE_Byte *r_buf, *g_buf, *b_buf;
+    SANE_Byte *data;
+
+    data = buf->ptr;
+    size = buf->end - buf->ptr;
 
-  for (i = 0; i < size / 3; i++)
+    for (i = 0; i < size / 3; i++)
+    {
+      r_buf = data;
+      g_buf = data + 1;
+      b_buf = data + 2;
+
+      red =
+       profile[0] * (*r_buf) + profile[1] * (*g_buf) + profile[2] * (*b_buf);
+      grn =
+       profile[3] * (*r_buf) + profile[4] * (*g_buf) + profile[5] * (*b_buf);
+      blu =
+       profile[6] * (*r_buf) + profile[7] * (*g_buf) + profile[8] * (*b_buf);
+
+      *data++ = clamp (red, 0, 255);
+      *data++ = clamp (grn, 0, 255);
+      *data++ = clamp (blu, 0, 255);
+    }
+  }
+  else if (buf->ctx.depth == 16)
   {
-    r_buf = data;
-    g_buf = data + 1;
-    b_buf = data + 2;
-
-    red =
-      profile[0] * (*r_buf) + profile[1] * (*g_buf) + profile[2] * (*b_buf);
-    grn =
-      profile[3] * (*r_buf) + profile[4] * (*g_buf) + profile[5] * (*b_buf);
-    blu =
-      profile[6] * (*r_buf) + profile[7] * (*g_buf) + profile[8] * (*b_buf);
-
-    *data++ = clamp (red, 0, 255);
-    *data++ = clamp (grn, 0, 255);
-    *data++ = clamp (blu, 0, 255);
+    uint16_t *r_buf, *g_buf, *b_buf;
+    uint16_t *data;
+
+    data = (uint16_t *)buf->ptr;
+    while(data < buf->end)
+    {
+      r_buf = data;
+      g_buf = data + 1;
+      b_buf = data + 2;
+
+      red =
+       profile[0] * (*r_buf) + profile[1] * (*g_buf) + profile[2] * (*b_buf);
+      grn =
+       profile[3] * (*r_buf) + profile[4] * (*g_buf) + profile[5] * (*b_buf);
+      blu =
+       profile[6] * (*r_buf) + profile[7] * (*g_buf) + profile[8] * (*b_buf);
+
+      *data++ = clamp (red, 0, 65535);
+      *data++ = clamp (grn, 0, 65535);
+      *data++ = clamp (blu, 0, 65535);
+    }
   }
 }

, and it seems to work!!! Makepkg went through and scanning with 16bpc actually worked.

So if anyone is having the issue, checkout iscan from arch repos using abs, apply this patch (tested with version 2.30.3) and makepkg. I'll try to file a bugreport to have this patch in the archrepos. Thanks hean01.

Offline

#6 2019-04-01 08:53:41

Markismus
Member
Registered: 2015-08-09
Posts: 40

Re: [solved] Scanner V600 doesn't scan in 16bpc mode

Thanks for your writeup @JohnRobbie.

I only seem to be able to get to 600dpi with 16bit color on my Epson Photo Perfection v370:

sudo scanimage --verbose --depth 16 --format=tiff --resolution 600 > /Ebooks/test-16.bit.600.dpi.tiff
scanimage: scanning image of size 5096x7019 pixels at 48 bits/pixel
scanimage: acquiring RGB frame
scanimage: read 214612944 bytes in total

If I try 1200-4800dpi it results in :

$sudo scanimage -d epkowa:interpreter:002:006 --verbose --depth 16 --format=tiff --resolution 1200
> /Ebooks/test-16.bit.1200.dpi.tiff
scanimage: sane_start: Invalid argument

Any ideas how to get the higher resolutions working? The specs suggests that it could be working. However, is there a way to see what is actually offered by the hardware other than scanimage -A?

First time using ABS, patch and editing the PKGBUILD. So it could be that I made some mistakes.  Here's how I did it:
I installed subversion following the Arch wiki for ABS. Created the community directory, changed to it and used svn update iscan. Changed to the directory iscan/repos/community-x86_64. I copy pasted your patch into a file called support16bpc.patch, created a sha256sum and changed the beginning lines of PKGBUILD to:

# Maintainer: Muflone http://www.muflone.com/contacts/english/
# Contributor: Frederic Bezies < fredbezies at gmail dot com>
# Contributor: garion < garion @ mailoo.org >
# Contributor: Alessio Sergi <asergi at archlinux dot us>

pkgname=iscan
pkgver=2.30.3.1
pkgrel=2
pkgdesc="EPSON Image Scan! front-end for scanners and all-in-ones"
arch=('x86_64')
url="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
license=('GPL2' 'custom:AVASYSPL')
depends=('gtk2' 'sane' 'libstdc++5')
makedepends=('gettext' 'gimp')
optdepends=('iscan-data: Image Scan! data files required for some devices')
source=("http://support.epson.net/linux/src/scanner/iscan/${pkgname}_${pkgver%.*}-${pkgver/*.}.tar.gz"
        "libpng15.patch"
        "jpegstream.cc.patch"
        "support16bpc.patch"
        "epkowa.conf")
sha256sums=('91a6cc1571e5ec34cee067eabb35f13838e71dfeda416310ecb5b5030d49de67'
            '1a75b8df945a813a297dfd6e3dabae3bc8b51898f23af31640091e31b901f0ba'
            '44990a5264e530a7a8ad1f95524e5d70e4f0f9009c53c8ea593cedf8d861a669'
            '8089bf64c0151667a41051b106ab8521ee60f639cb1b93ef085b6dc87ffdb834'
            '8e9e90fa50f1bd476b13766b19f100470c41dd253dc0605fbb1d0ac346a0beff')
install="${pkgname}.install"
backup=("etc/sane.d/epkowa.conf")

prepare() {
  cd "${pkgname}-${pkgver%.*}"
  # patch for building iscan against libpng15 by giovanni
  patch -Np0 -i "../libpng15.patch"
  # patch for ambiguous div in jpegstream.cc
  patch -Np0 -i "../jpegstream.cc.patch"
  # add fix for CXX ABI different than 1002
  ln -s libesmod-x86_64.c2.so non-free/libesmod-x86_64.so
  # add hean01 modification for 16bpc using JohnRobbie patch from https://bbs.archlinux.org/viewtopic.php?pid=183544>  patch -Np0 -i "../support16bpc.patch"
}

(I manually checked src/iscan/backend/channel-usb.c and the patches were applied.)
After that I ran in that directory

makepkg -s

and installed the resulting file with

pacman -U iscan-2.30.3.1-2-x86_64.pkg.tar.xz

Last edited by Markismus (2019-04-01 09:07:39)

Offline

#7 2019-04-01 11:51:58

Muflone
Trusted User (TU)
From: Italy
Registered: 2013-10-08
Posts: 68
Website

Re: [solved] Scanner V600 doesn't scan in 16bpc mode

Hi

I'm planning to integrate this patch into the main repository package but I'm not entirely sure if this could work for every firmware.

Could you please share your experience after installing this patch?

Offline

#8 2019-04-01 14:17:39

Markismus
Member
Registered: 2015-08-09
Posts: 40

Re: [solved] Scanner V600 doesn't scan in 16bpc mode

@Muflone It is an patch in the iscan package. So it is independent of specific firmware, isn't it? For the firmware I had to install a plugin package from the AUR.

That being said, although it enables 16bit scanning for the Epson Photo Perfection v370, it doesn't enable it for all resolutions. Only up to 600dpi, which is rather a low resolution for the scanning of photo's.

Offline

#9 2019-04-01 17:40:15

Muflone
Trusted User (TU)
From: Italy
Registered: 2013-10-08
Posts: 68
Website

Re: [solved] Scanner V600 doesn't scan in 16bpc mode

Markismus wrote:

@Muflone It is an patch in the iscan package. So it is independent of specific firmware, isn't it? For the firmware I had to install a plugin package from the AUR.

As far I know iscan is able to perform scan for some models without any needed firmwares.

For some models you need to provide extra firmwares. I own a V30 perfection which needs a specific firmware to work.

As I wish to avoid breakage of an official package using an unofficial patch, any report about using this special patch is welcome.

Offline

#10 2019-04-01 17:46:39

Muflone
Trusted User (TU)
From: Italy
Registered: 2013-10-08
Posts: 68
Website

Re: [solved] Scanner V600 doesn't scan in 16bpc mode

Markismus wrote:

First time using ABS, patch and editing the PKGBUILD. So it could be that I made some mistakes.

For the records, the ABS tool is deprecated and replaced by ASP.

asp export iscan

Offline

#11 2019-04-01 18:24:01

Markismus
Member
Registered: 2015-08-09
Posts: 40

Re: [solved] Scanner V600 doesn't scan in 16bpc mode

Thanks Muflone. Seems indeed a better way to go. 
I hadn't read all the way to the tips of ABS. Shouldn't this be in the introduction of ABS? Or is it really still very much up for discussion whether ABS is deprecated?

Offline

#12 2019-04-02 07:25:44

JonnyRobbie
Member
Registered: 2015-04-28
Posts: 148

Re: [solved] Scanner V600 doesn't scan in 16bpc mode

As far as I can remember, there's more commits in that repo across three branches then what I've compiled in this patch. And some of those commits try to fix higher dpi scanning too.

Unfortunately, I can't remember exactly, which commits I took to form this patch. The reason being that the iscan version he worked on is a five years old one and if I would naively took all the commits there and just  tried to merge that on top of the new version, it would most likely result in a merge hell. So I took the absolute minimum code of what I thought might solve my issue and created a patch.

You might try to take all those commits on that forked repo and patiently sift though merges to create a complete patchset - that might help to solve the issue.

Last edited by JonnyRobbie (2019-04-02 09:03:47)

Offline

#13 2019-04-02 16:22:05

Markismus
Member
Registered: 2015-08-09
Posts: 40

Re: [solved] Scanner V600 doesn't scan in 16bpc mode

Thanks @JonnyRobbie. That seems like something to do when there's time; a lot of time! Only a few commits. I'll look into it.

I'll first test the scanner on windows to see what can be expected to be supported.

Last edited by Markismus (2019-04-03 07:05:53)

Offline

#14 2019-04-12 11:36:41

Markismus
Member
Registered: 2015-08-09
Posts: 40

Re: [solved] Scanner V600 doesn't scan in 16bpc mode

TLDR: My Epson Photo Perfection V370 now works up to 4800dpi at 48bit color by patching iscan.
Workflow:

asp export iscan

Then get the PKGBUILD and hain01commits2dip-obj.patch by clicking their links. Put them into the newly created iscan directory.

makepkg -si

______________________

I have looked into these commits by Hain01 and most lines in the patch provided by JonnyRobbie seem to convert updates in iscan back to the older version.

In backend/channel-usb.c only one change is made over 2 commits changing the value from initially 1024 to 4096. Searching in the iscan\src\iscan-2.30.3 directory in no file the function channel_usb_max_request_size is mentioned. So I'm seeing this as an obsolete tweak. Why it worked for JonnyRobbie could well be because he reverted iscan to an older version. However, as I couldn't go beyond 600dpi it turned out not to be enough.
In backend/dip-obj.c a whole slew of changes is made with a small tweak in a second commit.

I've manually changed dip-obj.c, generated a patch file with diff -u and updated the PKGBUILD to include the patch file.

Testing results:

$sudo scanimage --verbose --depth 16 --format=tiff --resolution 600 > /Ebooks/test-16bps.600.dpi.tiff
scanimage: scanning image of size 5096x7019 pixels at 48 bits/pixel
scanimage: acquiring RGB frame
scanimage: read 214612944 bytes in total
$sudo scanimage --verbose --depth 16 --format=tiff --resolution 1200 > /Ebooks/test-16.bps.1200.dpi.tiff
scanimage: scanning image of size 10192x14039 pixels at 48 bits/pixel
scanimage: acquiring RGB frame
scanimage: read 858512928 bytes in total
$sudo scanimage --verbose --depth 16 --format=tiff --resolution 2400 > /Ebooks/test-16.bps.2400.dpi.tiff
scanimage: scanning image of size 20392x28079 pixels at 48 bits/pixel
scanimage: acquiring RGB frame
scanimage: read 3435521808 bytes in total
sudo scanimage --verbose --depth 16 --format=tiff --resolution 4800 -x 20 -y 20 > /Ebooks/test-16.bps.4800.dpi.tiff
scanimage: scanning image of size 3776x3779 pixels at 48 bits/pixel
scanimage: acquiring RGB frame
scanimage: read 85617024 bytes in total

Manual verification shows that indeed the scans are finer grained as the dpi goes up. Scanning of a photo at 4800dpi finally shows the texture of the photo material!

That is 205MB at 600dpi, 818MB at 1200dpi and 3.2GB at 2400dpi. There is 6min between the timestamps of the 600dpi and 1200dpi files. The 2400dpi is took almost an hour. (For comparison a 300dpi scan of the entire scan bed takes 26.814s.)


@Muflone So concluding I would say that my experience is that I won't use the earlier patch generated by JonnyRobbie, but the manually made one based on Hain01 commits to his repo.
Thanks @JonnyRobbie for pointing out that there was a lot more commited than originally taken into account by your patch!

Last edited by Markismus (2019-04-12 16:28:37)

Offline

#15 2019-05-17 15:39:48

matthew_2nHk
Member
Registered: 2019-05-17
Posts: 1

Re: [solved] Scanner V600 doesn't scan in 16bpc mode

Using this patched version of iscan prevents my V39 from connecting. Reverting to the community version restores connectivity.

I don't have time to dig into the issue today, but would be happy to investigate further next week.

Offline

#16 2019-05-17 16:45:29

Markismus
Member
Registered: 2015-08-09
Posts: 40

Re: [solved] Scanner V600 doesn't scan in 16bpc mode

I am Assuming you meant my patch and not JohnRobbie’s. Does your V39 support 16bpc at higher resolutions in the hardware (or in windows)?
I am speculating that it is either a mistake while creating the package or the enabling of higher color modes that are not supported. The changes in the patch are so little that I don’t know what else would cause a scanner to be not recognized any more.

What messages are generated when it fails?

Offline

Board footer

Powered by FluxBB