<div dir="ltr"><div dir="ltr"><div>Sure, here's the modified "dip_apply_color_profile":</div><div><br></div><div><font face="monospace,monospace">void<br>dip_apply_color_profile (const void *self, const buffer *buf,<br>                         const double profile[9])<br>{<br>  SANE_Int i;<br>  SANE_Byte *r_buf, *g_buf, *b_buf;<br>  double red, grn, blu;<br><br>  SANE_Byte *data;<br>  SANE_Int size;<br><br>  require (dip == self && buf && profile);<br><br>  log_info("Using %d bits per channel.", buf->ctx.depth);<br>  if (SANE_FRAME_RGB != buf->ctx.format)<br>    return;<br><br>  log_info("Buffer size: %d", size);<br><br>  if (16 == buf->ctx.depth) {<br>    uint16_t *p = (uint16_t *) buf->ptr;<br>    uint16_t *e = (uint16_t *) buf->end;<br><br>    uint16_t red_16, grn_16, blu_16;<br><br>    while (p < e)<br>    {<br>      red_16 = p[0];<br>      grn_16 = p[1];<br>      blu_16 = p[2];<br>      red =<br>        profile[0] * (red_16) + profile[1] * (grn_16) + profile[2] * (blu_16);<br>      grn =<br>        profile[3] * (red_16) + profile[4] * (grn_16) + profile[5] * (blu_16);<br>      blu =<br>        profile[6] * (red_16) + profile[7] * (grn_16) + profile[8] * (blu_16);<br><br>      p[0] = clamp(red, 0, 0xFFFF);<br>      p[1] = clamp(grn, 0, 0xFFFF);<br>      p[2] = clamp(blu, 0, 0xFFFF);<br>      p += 3;<br>    }<br>  }<br><br>  if (8 == buf->ctx.depth) {<br><br>    data = buf->ptr;<br>    size = buf->end - buf->ptr;<br><br>    for (i = 0; i < size / 3; i++) {<br>      r_buf = data;<br>      g_buf = data + 1;<br>      b_buf = data + 2;<br><br>      red =<br>        profile[0] * (*r_buf) + profile[1] * (*g_buf) + profile[2] * (*b_buf);<br>      grn =<br>        profile[3] * (*r_buf) + profile[4] * (*g_buf) + profile[5] * (*b_buf);<br>      blu =<br>        profile[6] * (*r_buf) + profile[7] * (*g_buf) + profile[8] * (*b_buf);<br><br>      *data++ = clamp (red, 0, 255);<br>      *data++ = clamp (grn, 0, 255);<br>      *data++ = clamp (blu, 0, 255);<br>    }<br>  }<br>}<br></font></div><div><br></div><div>Pay good attention to the compiling process, to ensure that the modified driver properly replaces the default iscan driver. I think you had to pass some very specific folder paths to the ./configure script (as command-line arguments) to match with your system. This was required to make sure that the driver finds the proper data files after compilation (the ones provided by the iscan-data package).</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Sep 4, 2018 at 7:59 PM Robert A. Schmied <<a href="mailto:uwppp@flash.net">uwppp@flash.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">aloha camil<br>
<br>
i note your prior message dated 4 aug 18 in which you list function<br>
void dip_apply_color_profile of the iscan package -- is this the part<br>
you are referring to when you write ".. edit the driver source code .."?<br>
<br>
regardless, for us casual hackers more specifics as to what to<br>
edit/change would be extremely helpful and greatly appreciated.<br>
<br>
<br>
ras<br>
<br>
<br>
<br>
Camil Băncioiu wrote:<br>
> Unfortunately, on Linux you will not have 16-bit scanning, only 8-bit, if<br>
> that is important to you. Scanning at 16-bit can be enabled, but you need<br>
> to edit the driver source code and compile it yourself. I have done so.<br>
> <br>
> On Sun, Sep 2, 2018 at 8:06 PM Yuri Chornoivan <<a href="mailto:yurchor@ukr.net" target="_blank">yurchor@ukr.net</a>> wrote:<br>
> <br>
> <br>
>>вівторок, 21 серпня 2018 р. 13:23:51 EEST Виктор Рыжков написано:<br>
>><br>
>>>Hello, sane-developers!<br>
>>>Help me please. I am work in Vologda State Library.<br>
>>>We switched from Windows to ALT Linux, and we had problems with the Epson<br>
>>>Perfestion V37/V200 scanners. There are no official Epson drivers on the<br>
>>>ALT Linux.SANE does not support them. Do you have the opportunity to help<br>
>>>us in this matter?<br>
>>>Yours faithfully, engineer of support Viktor Ryzhkov.<br>
>><br>
>>Hi,<br>
>><br>
>>You can use drivers from the hardware manufacturer:<br>
>><br>
>><a href="http://download.ebz.epson.net/dsc/search/01/search/searchModule" rel="noreferrer" target="_blank">http://download.ebz.epson.net/dsc/search/01/search/searchModule</a><br>
>><br>
>>Just enter "V37" then download packages for your distribution (ALT is RPM-<br>
>>based, you should choose 32- or 64-bits RPM). Install those RPMs.<br>
>>Interface is<br>
>>very similar to the one for Windows.<br>
>><br>
>>Works fine here for Epson Perfection V330 Photo (same family) on Mageia 6,<br>
>>64-<br>
>>bits.<br>
>><br>
>>Hope this helps.<br>
>><br>
>>Best regards,<br>
>>Yuri<br>
>><br>
>><br>
>><br>
>><br>
>>--<br>
>>sane-devel mailing list: <a href="mailto:sane-devel@alioth-lists.debian.net" target="_blank">sane-devel@alioth-lists.debian.net</a><br>
>><a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/sane-devel" rel="noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/sane-devel</a><br>
>>Unsubscribe: Send mail with subject "unsubscribe your_password"<br>
>>             to <a href="mailto:sane-devel-request@lists.alioth.debian.org" target="_blank">sane-devel-request@lists.alioth.debian.org</a><br>
> <br>
> <br>
> <br>
<br>
</blockquote></div>