[sane-devel] unpaper endianess

Julien BLACHE jb@jblache.org
Fri, 11 Mar 2005 19:31:56 +0100


Jens Gulden <mail@jensgulden.de> wrote:

Hi,

>> Unpaper seems to have endianness issues;
>
> Are you using 1-bit-per-pixel input or output files (i.e. .pbm, not
> .pgm)? The only place where I would ad-hoc suspect an endianess issue

I think I used pgm both times, I'll retry to confirm that.

> is when the single bits are accessed during conversion from/to 1-bit
> images...
> Is it exactly the same input file, both on Intel and PPC?

Yes, jpeg converted to pgm using convert (same version on both machines).

> I am not an experienced C programmer at all (most of the time I work
> with Java), so it might well be that I did something stupid with
> regard to endianess...

I'll do some tests and see if I can come up with something. Try to
recover some pages scanned from a book with big gray areas right now,
works pretty well but it still needs some tweaking.

JB.

-- 
Julien BLACHE                                   <http://www.jblache.org> 
<jb@jblache.org>                                  GPG KeyID 0xF5D65169