[sane-devel] Dimension ranges
Oliver Rauch
oliver.rauch at rauch-domain.de
Fri May 3 22:41:51 BST 2002
Hello Dave,
the backend should not use the length unit pixel when it
can use the length unit millimeters.
The lngth unit pixle e.g. is for digital cameras and other
devices that do not use or know about a resolution.
Bye
Oliver
Dave Close wrote:
>
> Henning Meier-Geinitz wrote:
> >I see. I don't like counting starting by 0 :-)
>
> SANE permits the boundaries of a scan to be expressed in whatever units
> the backend supports. Many support standard units like millimeters or
> inches. Some support actual pixels. But I'm a little confused about how
> to think about the difference.
>
> Consider a scanner capable of an image up to US letter size, 8.5 inches
> by 11 inches. If expressed in inches, the X SANE_Range might be { 0,
> 8.5, 0 }. If the resolution is 300 dots per inch, this would translate
> to a SANE_Range in pixels of { 0, 2550, 0 }. But that isn't quite right.
>
> To achieve an image of maximum width, a frontend might set the top-left
> X position to 0 inches and the bottom-right X position to 8.5 inches.
> Converted to pixels, these settings would be 0 and 2550. But that can't
> be: there are 2551 pixels in that range, one too many.
>
> A backend which wants to use pixels for dimensions might solve this by
> setting the range to either { 0, 2449, 0 } or { 1, 2550, 0 }. Is there
> a preferred solution?
> --
> Dave Close Dreamworks SKG, Animation Technology
> +1 818 695 6962 Glendale California 91201-3007
> dclose at anim.dreamworks.com http://www.dreamworks.com/
>
> _______________________________________________
> Sane-devel mailing list
> Sane-devel at www.mostang.com
> http://www.mostang.com/mailman/listinfo/sane-devel
--
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 at rauch-domain.de
More information about the sane-devel
mailing list