darsto / brother-scand

Network driver for Brother scanner devices. Daemon for press-to-scan functionality.
MIT License
7 stars 16 forks source link

ADF produces invalid images #8

Open rumpeltux opened 5 years ago

rumpeltux commented 5 years ago

The automated document feed function is a bit broken as it produces (incomplete) JPEG images with dimensions that tools can’t open:

$ file scan0.jpg 
scan0.jpg: JPEG image data, JFIF standard 1.02, resolution (DPI), density 100x100, segment length 16, baseline, precision 8, 826x65535, frames 3

accordingly also the receiving data: estimate is wrong.

Not sure if the tool can easily fix this. Otherwise some external processing can probably fix the header and make the image openable. A quick hack that doesn’t take the actual image height into account is:

echo "a5: 0f" | xxd -r - scan0.jpg