Fix crash for 8-bit gray images, crop unused-expanded parts of image
Should fix Skanpage bugs BUG: 469683 BUG: 457097
I simulated both with the test scanner and also in Skanlite.
I used the test scanner in hand scanner mode, perhaps the issue is caused by backends not giving final image height before a scan...
Also, for 16-git RGB: m_frameRead++;
was not issued for every byte, like in all the others.
And, for the 3-pass scanners, the m_image->bits()
pointer can change after calling renewImage()
. It needs to be read afterwards, like in the other cases.