Have a look at
sane
Xsane
scanimage
imagescan
iscan
python-sane
Or whatever scan utility that you want to use.
Then look to see if your scanner is supported by it.
If there is support for it then it's as simple as:
Code:
scanimage --source Flatbed --mode Color --format=jpeg > scan.jpg