[sane-devel] padded formats
m. allan noah
anoah at pfeiffer.edu
Tue Mar 28 16:05:05 UTC 2006
On Tue, 28 Mar 2006, Felix Rubio Dalmau wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
>
> In SANE documentation is told that the number of bytes per line is
> padded by the formula gived there. Can I assume that the bytes of data
> are consecutive and, consequently, I should only remove the final bits
> (the ones to seem be the "padding bits") ?
> For example, if I have a line with 3 pixels, with 3 channels and a
> depth of 8 I should have 3 * 3 * 8 bpp/ 8 = 9 bytes but by the
> formula, I get 3 * 3 * [(8 + 7)/8 ] = 18 bytes. Can I remove the final
> 9 bytes? How must I manage this data? I know that it's a basic
> question, but I'm tryin to learn it :-) thanks!
no, this is integer math, hence the []. this basically means that
[(8+7)/8] = 1
so both versions are 9 bytes.
allan
>
> - --
> Josep Felix Rubio Dalmau
> GnuPG Public Key:
> http://keyserver.veridis.com:11371/export?id=-9021467632073768555
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFEKTgGgs1O/IWPAZURAxuRAJ938e2H5c5XPAfT8+leR5wC3bpMHQCfYVtK
> Tn7R+ZhNL/6AvpemzFuIw90=
> =svlx
> -----END PGP SIGNATURE-----
>
>
>
> ______________________________________________
> LLama Gratis a cualquier PC del Mundo.
> Llamadas a fijos y móviles desde 1 céntimo por minuto.
> http://es.voice.yahoo.com
>
>
>
--
"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