[sane-devel] pixels_per_line and bytes_per_line

m. allan noah anoah at pfeiffer.edu
Wed Apr 26 16:01:58 UTC 2006

On Tue, 25 Apr 2006, Henning Meier-Geinitz wrote:

> Hi,
> On 2006-04-25 14:31, Wittawat Yamwong wrote:
>> The SANE Standard Version 1.04 under 4.3.8 states that
>> c >= B * n * d/8    for d > 1
>> "Note that the number of bytes per line can be larger than the minimum
>> value imposed by the right side of this equation.  A frontend must be
>> able to properly cope with such "padded" image formats."
> The frontend should be able, but in reality it isn't. At least I don't
> know of any frontend who could do that. You can also test that
> behaviour with the test backend by setting the option --ppl-loss to a
> value > 0.
>> doesn't need to throw the padding bytes away. But the output image from
>> "scanimage" is corrupted. It seems to me that the frontend works properly if
>> and only if c = B*n*d/8. What should I do in this case?
> Fix scanimage and all the other frontends. Or easier, do the removal
> of the padding in the backend.

the other option in this case is to change the image size as reported to 
the frontend by the sane_get_param call, so that it is a multiple of 12. 
several backends do this with binary scans that must be on 8 bit 


"so don't tell us it can't be done, putting down what you don't know.
money isn't our god, integrity will free our souls" - Max Cavalera

More information about the sane-devel mailing list