Replies: 6 comments
-
@zgdump, Once Calling This is not something special to |
Beta Was this translation helpful? Give feedback.
-
I figured out the problem. I called Thanks for the |
Beta Was this translation helpful? Give feedback.
-
I think its a corner case. If maxlen == 0, both behaviours looks correct.
P.S. I probably can close this issue or convert it into discussion? |
Beta Was this translation helpful? Give feedback.
-
Please move this issue into discussions. There is no bug, "delo bylo ne v bobine". Last question, if it's not too difficult. How to properly scan via SANE, via sane_read? Any pitfalls or tips? Or I just need to remember about maxlen > 0? After our discussion, I looked at the simple-scan source code and saw that it reads pixels by scanlines and it confused me. |
Beta Was this translation helpful? Give feedback.
-
@zgdump, there is no any special tips that come to mind. But you are welcome to ask any questions as they come. Please note, that different drivers may differ in their behaviour in some nuances. But SANE API is simple, so in general, everything work quite straightforward. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your help! Тo questions yet. Second thanks for this wonderful project, I don't know what I would have done without it) |
Beta Was this translation helpful? Give feedback.
-
I was experimenting with the SANE API and found that sane-airscan returns an error when calling
sane_start()
twice.I wrote a small program which scans as scanimage tool. The SANE API calls were like this:
It works, but scan was very slow. In the documentation, in the code flow section, says that I can scan again without reopening the device:
I added a second
sane_start()
call and now the calls were like this:And the second call of
sane_start()
returnedINVAL
. The documentation says that INVAL means that "scan cannot be started with the current set of options". But if I re-open the device, scanning proceeds without problems.To check, I changed
airscan:e0:HP_Laser_MFP_135wr
tov4l:/dev/video0
and scanning occurs without problems, without re-opening the device.sane-airscan config
If necessary, I can provide any logs and help with debugging.
Beta Was this translation helpful? Give feedback.
All reactions