Before getting into real work with batchscanning for SANE,
I hacked an extension into the PNM backend.
Good for testing frontends without scanner
and to learn the inside of SANE.
The extension is allowing to scan part of the image by
selection.
I know there are shortcomings (no grey or 3-pass) and
I am sure there are stupid mistakes (SANE beginner, me),
so it would be nice if you SANE gurus could have a look at
it.
File "pnm.c" attached.
terveiset,
-- --------------------------------------------- Göran Thyni, sysadm, JMS Bildbasen, Kiruna --------------F489D1CFD36D435B5A9549E4 Content-Type: application/x-gzip; name="pnm.c.gz" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="pnm.c.gz"H4sICOvuyTUCA3BubS5jAOU7a1PbSLaf4Vcc2ErGNgZsyBvIXgOGeAM2ZZtMuLkplSy1sSqy 5EhywJPhb9/Pe87pltSyJePMTu7W3J2aClarz/vRp0+3disQmp6AbehZpueJABqWJcIQ2v4d NM1wtrMOACf+ZBY4t6MISidlqL9+/aJK/76EhmcHwgzhWFhfaGJ/5IQwdFwB+HdiBhH4Q4hG AnqNdhMHrC/mrdhZT6ZOAv82MMc0exgIAaE/jO7MQBzAzJ8CcgSBsJ0wCpzBNEKkEZievesH hGDs285wRmNTz0bGiUwkgnEY0zxvX8O5QJlMF66mA9ex4MKxhBcKMEPCMKHBcCRsGMwY4ox4 6Cke4MxHxGbk+N4BCAffB/BNBCE+w56iQVgUzir4AZTMiDgPwJ8QXBnZnYFrRilovvCpjDY4 HvMy8icozwgRooR3juvCQMA0FMOpWwWcSWh+bfXfda770GjfwK+NbrfR7t8c4ORo5E8jEN+E ROWMJ66DmFGqwPSiGTJP0JfN7sk7BGkcty5a/Rvi/6zVbzd7PTjrdKEBV41uv3VyfdHowtV1 96rTa+4A9ISItUtIChQ8RGRjH5Voi8h03FCKfYNGDZE314aR+U2gcS3hfEPOTLDQxR43HCEx Xd+7ZSFxcqrGA3CG4PlRFe4CB30l8hdNSuCpVavQ8qydKjx/DX2BKhJw5ZoWx8KUMOzv16pw 7IcRTmV9NaC2V6/Xt+v7tZdVuO41pFSNEPkPJ8JykF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NMAWrNe1bS5PUcoN/UxBlIb3Pr08RyFk/6emp7oA1QhbMQfHMVml9RLSfVQloVAUipK 10p0hspBiANNl5SYdGKyFE586r95gQn86e1Is0eV2icoEd/+kL5PeCgx3Gb2WmvqGG2ic0Dy EJdouUPFIP3ekgswdw+kMUol+tS4DBPUHMJNPtXln73PtEnYL6iICTChlS2zpbcyqZiJR+QU 91FADXw6FyIJZVbgj+vDMCPi4+JUJnOO36NvsOcdX362HKAaNSfLehHiIrs/kSWfFgNKZno5 73nlg2wALQ2XWI75uEg9fvcoJv6Qtyci4abWFxLHDGE8tUaZz0VwbOKHocPfNIcO31iNfgnB dCmMZkoLqDx1JQjkBkdTSNIbSmvACLe9HIVHueuC7uTaUvCWa/QyLK/8AGT+4/RnliSh8kFe CuByB5OAnJMb8HzCEEcyrRoaP4fqM6o4BsdibE1mJa4fIO5wqVbvbyLw+Y0M62qMsRJ7umQs Hc2PmKIcskicnEsFTjlh5CEnlZFQVAkkhQDs7may29pq5UCmc3QEr+RSSvc65PKAwemF0jn4 O2YqSU6blx3otC9uYAP671o9rIPeN3vQ7mBJ0O41IbkBymF7Lw/471HxlBnhfmsrPthH5WDR xectpalHhRd9E8mOVwaldlTWNtT3Xh3IubivLskTCdTU0i8Gy2UFgpG0dKKatnUU3/uCt2+L cFIwMy9cCLoUyHIxlnLUtDdvYe/5c+0dPuHbSimV6yguOWODVJISQa0hqdvK5LDiPQK60eYW b0DTr1t//obwIX+HjHsXxzfGdE9pSWVPF2c83zMGmBPoq3DJ/iMd9MKGiryiZAztRy4AVGBo r0rpn9Hr7rNeRgAA --------------F489D1CFD36D435B5A9549E4--
-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com