[sane-devel] API addition request

Alessandro Zummo azummo-lists at towertech.it
Sat Jun 20 12:42:07 UTC 2009


On Sat, 20 Jun 2009 14:18:00 +0200
Alessandro Zummo <azummo-lists at towertech.it> wrote:

> > While we are at it, It would make my life easier if there were
> > something to indicate whether the scan is from the flatbed or ADF, and
> > if the latter, whether duplex or not.  
> 
>  agreed. should be easy too.

 We could grow SANE_Parameter with a flags field and a version field:

typedef struct
{
    SANE_Int version;
    SANE_Word flags;
    SANE_Frame format;
    SANE_Bool last_frame;
    SANE_Int bytes_per_line;
    SANE_Int pixels_per_line;
    SANE_Int lines;
    SANE_Int depth;
}
SANE_Parameters;

#define SANE_PARAMF_DUPLEX	(1L << 0)
#define SANE_PARAMF_ADF		(1L << 1)

 We could also add a media type field, with values
 like paper, film negative, film positive, .....

 Having a version field allows to extend it without
 breaking compatibility.


-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it




More information about the sane-devel mailing list