2
2
Copyright (C) 2008, Panasonic Russia Ltd.
3
Copyright (C) 2010, m. allan noah
3
Copyright (C) 2010-2011, m. allan noah
5
5
/* sane - Scanner Access Now Easy.
6
6
Panasonic KV-S1020C / KV-S1025C USB scanners.
283
283
if (dev->current_side == SIDE_FRONT)
285
/* back image data already read, so just return */
285
286
dev->current_side = SIDE_BACK;
286
/* return; image data already read */
287
DBG (DBG_proc, "sane_start: exit\n");
289
return SANE_STATUS_GOOD;
287
DBG (DBG_proc, "sane_start: duplex back\n");
288
status = SANE_STATUS_GOOD;
330
/* software based enhancement functions from sanei_magic */
331
/* these will modify the image, and adjust the params */
332
/* at this point, we are only looking at the front image */
333
/* of simplex or duplex data, back side has already exited */
334
/* so, we do both sides now, if required */
335
if (dev->val[OPT_SWDESKEW].w){
336
buffer_deskew(dev,SIDE_FRONT);
338
if (dev->val[OPT_SWCROP].w){
339
buffer_crop(dev,SIDE_FRONT);
341
if (dev->val[OPT_SWDESPECK].w){
342
buffer_despeck(dev,SIDE_FRONT);
344
if (dev->val[OPT_SWDEROTATE].w || dev->val[OPT_ROTATE].w){
345
buffer_rotate(dev,SIDE_FRONT);
348
if (IS_DUPLEX (dev)){
349
if (dev->val[OPT_SWDESKEW].w){
350
buffer_deskew(dev,SIDE_BACK);
352
if (dev->val[OPT_SWCROP].w){
353
buffer_crop(dev,SIDE_BACK);
355
if (dev->val[OPT_SWDESPECK].w){
356
buffer_despeck(dev,SIDE_BACK);
358
if (dev->val[OPT_SWDEROTATE].w || dev->val[OPT_ROTATE].w){
359
buffer_rotate(dev,SIDE_BACK);
365
/* check if we need to skip this page */
366
if (dev->val[OPT_SWSKIP].w && buffer_isblank(dev,dev->current_side)){
367
DBG (DBG_proc, "sane_start: blank page, recurse\n");
368
return sane_start(handle);
329
371
DBG (DBG_proc, "sane_start: exit\n");