[sane-devel] hp5590: Scan aborts when using default page size

Rainer Keller mail at rainerkeller.de
Thu May 29 10:40:57 UTC 2014


Hi,

> The SANE API only provides for SANE_UNIT_MM for lengths.  Just looking
> at your patch, the *original* code seems to be correct.  The real bug is
> somewhere else in the hp5590 backend.

Ok, thanks for the hint.
Given that all lengths are in millimeters, isn't multiplying mm with dpi wrong 
then? In this backend there are some places where this happens:

e.g.  backend/hp5590.c:1053
  scanner->tl_x * scanner->dpi,
  scanner->tl_y * scanner->dpi,
  (scanner->br_x - scanner->tl_x) * scanner->dpi,
  (scanner->br_y - scanner->tl_y) * scanner->dpi,

Regards,

Rainer



More information about the sane-devel mailing list