That's a new feature for KSaneWidget, that is turned off by default and should be enabled via UI (SkanLite).
It addresses the following problem.
Currently KSaneWidget has preview and scan buttons.
If you click on preview - whole scanning area will be scanned with small dpi (usually 50dpi). And then displayed in GUI. The displayed scanner area could be used to select actual page in it and perform a real scan of selected subarea with a good dpi (300+ dpi). Selection of the subareas is a great option that allows to minimize page scanning time.
If you click scan - you'll just subsequently scan all subareas, or whole scanning area if no subareas were selected. But you'll not see the results. Result can't be displayed in preview window instead of preview as one of it's main functions is to let user select subareas and result may be subarea by itself. There is an option that shows you a result in pop up dialog just before saving, but this interrupts the scanning process and waits for user response.
My scanning process is usually like that: Put a book in scanner, align it to one of scanner's corners. Do preview, select scanning area, scan. Turn the page, align book to the same corner, scan. Etc. I don't see the resulting images. Otherwise I would need to open last saved file every time or enable "preview before save" option and get interrupted after each scan. I rely on fact that book pages are all of the same size and all content will be scanned if I place book in the same position. So I'm scanning in "blind" mode without actually seeing results.
But there are cases when I want to fast check last scanning result even if i'm sure all content is inside subarea:
- I forgot if I already turned the pages or accidentally closed the book and want to recall last scanned page no.
- I've changed some scanning settings (color/grayscale or dpi) and want to check if I managed to achieve expected quality.
- I want to check if there aren't any hairs, dirt, small piece of paper on scanner's glass that could get there after pages turn.
- I want to check how curvy is text that is closer to the book's spine. It depends on strength of pressure on the book and could change in case of page is in a middle of the book or at beginning.
So I need at least a button "Show me last scan" that I can click when I want to check last result.
But I decide to make a bit better function - display last scan automatically in widget's UI. First idea was to copy last scanned image to respecting area of displayed preview image. But it's inconsistent as UI will display some chimera made of old image and new images. And as preview is 50 dpi and actual scans of subareas are mostly 300+ dpi this will require some scaling that require noticeable cpu time. Thus I end up with following solution:
If function is enabled widget will display a vertical tab near preview image with tabs: "Preview" and "Current Scan". In case second is clicker KSaneImageViewer is switched to display another QImage. It's area selection functionality is disabled as there is no sense to select subareas in subarea. And this QImage isn't just loaded from latest saved scan file but builded dynamically chunk by chunk during scanning in progress as preview image is build. So user'll see the result even before scanning ends.
After turning on this function user experience will be following:
Put a book on scanner, click preview, select pages area in preview image, switch to Current Scan tab, click Scan button - look on actual scanning results at real time. Turn the page, click on scan button again. etc. Need to change selection? Go to preview tab, change selection in it (or even update preview) and get back to Current scan Tab for actual scanning.
This review contains most of the code, but to test it you'll need to enable it via GUI (as it's disabled by default). Thus another patch will be send to Skanlite repository to add required setting in its GUI.
P.S. Feature is switched off by default bcs it requires more RAM than usual. High dpi quality A4 scans may be too big to keep another copy in RAM of old <=1Gb RAM machine without system performance decrease.