I'm trying to make an non network scanner to work with linux running via command line and hiding it with php/html. The commands to scan hp-scan and scanimage are working well but they don't automatically select the non blank are to scan. For example if I scan a business card (85mm x 58mm) it scans the entire scanner area. Does sane have an utility to fix that? I am using ubuntu 13 and mint 16.
scanimage --mode Color --resolution 100 --progress --compression JPEG --jpeg-quality 80 --format=tiff | convert tiff:- teste.jpg