2026-11-03 17:41 UTC
[SANE/scanning] Can I make the scanner only scan the image area?
I’m scanning old family photos with a Canon LiDE 400 using scanimage but the scanner outputs/scans the whole scanning surface, not only the photo. I’m working in the Linux terminal and I’d rather not install a GUI at this time. If I did, I’d simply use XSane to crop the image. The scanner doesn’t have any length/width markings along its edges, otherwise I’d just input the dimensions of the photo.
Any solutions?
Replies (3)
-
@suodrazah@lemmy.ml 2026-11-03 18:00
ImageMagic can do this with mogrify. You can add it to your term workflow or batch the images at the end. mogrify -trim +repage *.png
-
@Ooops@feddit.org 2026-11-03 18:47
Only that scanimage’s manpages talk about -x and ^-y ^ parameterswith the caveat that the device has to support it. Also: -l (top-left x position of scanned area), and possibly -t (y posiiton) PS: All values in millimeters PPS: Did a quick test. At least my scanner works with scanimage -l 50 -t 50 -x 100 -y 100 > test.pnm
-
@beejjorgensen@lemmy.sdf.org 2026-11-03 18:48
If I want to scan a 100mm wide by 50mm tall area at 300 DPI, I use: scanimage -x 100 -y 150 --resolution 300 --output-file foo.jpg