I am trying to make an application which works with a scanner on Linux (I am using sane-backends). Scanner works fine; I am getting an image using my app, BUT it is not A4 format. It has 1696*3743 resolution. I used sane_get_parametrs(), and got this:
Frame Format: 1
Last Frame: 1
Bytes per line: 5088
Pixel per line: 1696
Lines: 3743
Depth: 8
That's why I want to adjust the scanner using my app. When I used sane_get_option_descriptor(), I got these options:
- 12 - Sets the resolution of the scanned image.
- 13 - Sets the horizontal resolution of the scanned image.
- 14 - Sets the vertical resolution of the scanned image.
- 44 - Top-left x position of scan area.
- 45 - Top-left y position of scan area.
- 46 - Bottom-right x position of scan area.
- 47 - Bottom-right y position of scan area.
Using sane_control_option() I found that option number 12 has resolution 400 dpi, 13 has 200 dpi, and 14 has 320 dpi. I changed all on 400 dpi, checked again, and sane_control_option() said that all option has 400 dpi; however, I got an image with same not A4 format =(. I also tried to play with 44-47 option, I changed scan area, but result was the same again and again. It looks like it shows to me that changes accepted, but it actually didn't accept. Function sane_control_option() always returns "good" status. So, I am confused, and I will appreciate any help.