Samsung SCX-4220: Incorrect area at the end of the scan
When scanning in Lineart and Halftone and calling sane_read, an area appears at the bottom of the scan in which the last correctly read line is repeated. The size of the area seems to depend on DPI: decreasing DPI leads to a larger problem area. In Lineart the problem is more noticeable than in Halftone (in the first mode the area is clearly visible even at 150 dpi, while in the second it appears only at 75 dpi or perhaps a little more).
The problem can be reproduced using simple-scan when scanning in "Text" mode at 75 dpi.
It looks like this is a regression after commits 3a58649f, 7b0572a1 and 1e1f8aff. On Fedora 39 the problem was reproduced on the master branch. On version 1.2.1 and after reverting these commits on the master branch, the error is not reproduced.