Oliver Rauch, Don, 24 Mai 2001 :
> mh wrote:
>
> > Hi Oliver,
> > just to let you know, I can reproduce this with the plustek backend too.
> > I was browsing through your code this morning, and I think, that the following
> > looks suspect:
> > In xsane-preview.c (around line 2175/ version 0.76)
> > /* See whether there is a saved preview and load it if present: */
> > for(level = 2; level >= 0; level--)
> > {
> > //Problem:
> > //If you did a fullsize scan and afterwards e.g. an A5 scan,
> > //p->filename[0] holds a valid filename (== the name of the
> > //fullsize preview); therefore the for loop will always count down
> > //to 0 and the fullsize preview is reloaded.
> > if (p->filename[level])
> > {
> > in = fopen(p->filename[level], "rb"); /* read binary (b for win32) */
> > if (in)
> > {
> > quality = preview_restore_image_from_file(p, in, quality);
> > fclose(in);
> > }
> > }
> > }
> >
> > I don't know, whether this is correct, but may be you can take a look at it.
>
> This is correct.
> level=0 is maximum scanner surface,
> level=1 is reduced scanner surface, subpart of level 0
> level=2 is zoomed area, subpart of level 0 and 1
>
> quality = preview_restore_image_from_file(p, in, quality);
> loads the given file when:
> - it covers the area that has to be shown in the preview window
> - it has a higher quality than a possibly already loaded image
>
> It does not display the complete image, it only uses the wanted subpart.
Errm, it displays the wanted subpart, but uses the *wrong* preview for this.
(I think that's what the original poster was talking about).
BTW, this should happen independently of the backend(?):
-insert a document and scan a fullsize preview
-insert a new document, change the previewsize to A5 e.g.
-If you now start a preview scan, the new document is shown for a short moment,
but gets immediately replaced with the subpart of the *previous* document
(p->filename[0], which is a preview of the first document, and not of the
current document in this case)
Or is this intended; does one have to scan a fullsize preview first ?
bb
Michael
-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
This archive was generated by hypermail 2b29 : Thu May 24 2001 - 03:29:12 PDT