<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em seg., 25 de jan. de 2021 às 04:35, Alexander Pevzner <<a href="mailto:pzz@apevzner.com">pzz@apevzner.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 1/25/21 2:49 AM, Thiago Milczarek Sayão wrote:<br>
<br>
> Some observations:<br>
> 1 - I have limited it to work with 1 Frame only. Would be nice to have <br>
> an API where sane manages multi-frame situations;<br>
<br>
This is about SANE options. You can choose input source from Flatbad/ADF <br>
simplex/ADF duplex list. In the ADF mode, a sequence of <br>
sane_start/sane_read operations will scan and return all images from the <br>
ADF.<br>
<br>
There is no way to scan only a single page from the ADF (i.e., once <br>
started, scaning will not stop, even if you will not issue next <br>
sane_start to obtain the next page).<br>
<br></blockquote><div><br></div><div>I mean, by my understanding a frame could be also only RED, or GREEN or BLUE and</div><div>in this case I need to create an image of this composition.</div><div><br></div><div>I have just ignored it as I am using modern scanners.<br></div><div> </div><div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I will guide you through SANE options, once we will get basic <br>
functionality working.<br>
<br>
> 2 - Sane is very easy, the difficult part is to convert the received <br>
> bytes onto an image. Would also be nice to convert the code on <br>
> scanimage.c to an API call;<br>
<br>
What do you want to get in result, image file in some standard (say <br>
JPEG/PNG format), or Java image object?<br></blockquote><div><br></div><div>I took a peek at jfreesane project and converted it in the Java side, but I have noticed</div><div>that all the code is on scanimage.c. Would be nice if there is a sane api to get an image</div><div>in a specific format instead of a "raw" one.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> Note:<br>
> I got it working with the Ricoh driver, will try to connect with an <br>
> apple device and wireshark it<br>
<br>
It would be very nice.<br>
<br>
You also can try VueScan for Linux <br>
(<a href="https://www.hamrick.com/linux-scanner-software.html" rel="noreferrer" target="_blank">https://www.hamrick.com/linux-scanner-software.html</a>). VueScan may <br>
choose to use eSCL, and it leaves full protocol trace in the <br>
.vuescan/vuescan.log file.<br>
<br>
I can't believe that eSCL implementation is totally broken on Ricoh, so <br>
probably I just miss some nuances. Looking to working implementation's <br>
trace could help.<br>
<br></blockquote><div><br></div><div>I will follow up on that. Tried the software on an iPad but with no success (I don't own any other mac device). Will try VueScan.</div><div>I have also contacted the company that provides the hardware for us, maybe they can help.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
-- <br>
<br>
        Wishes, Alexander Pevzner (<a href="mailto:pzz@apevzner.com" target="_blank">pzz@apevzner.com</a>)<br>
</blockquote></div></div>