Re: [BUG] Epson 1640SU, xsane preview problem

From: Oliver Rauch (oliver.rauch@rauch-domain.de)
Date: Thu May 24 2001 - 02:39:52 PDT

  • Next message: mh: "Re: [BUG] Epson 1640SU, xsane preview problem"

    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.

    Bye
    Oliver

    -- 
    Homepage:	http://www.rauch-domain.de
    sane-umax:	http://www.rauch-domain.de/sane-umax
    xsane:		http://www.xsane.org
    E-Mail:		mailto:Oliver.Rauch@rauch-domain.de
    

    -- 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 - 02:45:50 PDT