[sane-devel] Epson 2450: scanimage produces invalid PNM files

Oliver Rauch oliver.rauch at rauch-domain.de
Sat Apr 13 17:26:52 BST 2002


Roland Roberts wrote:
> 
> Like Thomas Wenrich <wet at chello.at>, I've seen problems with the
> header information specifying a larger file than what is actually
> returned.  However, I've also found another problem.
> 
> The Epson 2450 has a --depth 16 option to return 16-bits/color.  The
> PPM or PGM files produced are byte-flipped, i.e., they are written LSB
> first instead of MSB first.  It turns out that XV reads the 16-bit
> images in the wrong byte-order so if you use XV to view them,
> everything looks fine.  But if you use anything else, e.g., ee,
> display, etc., you find they are complete hash.  If you try to change
> the depth with pnmdepth the resulting 8-bit/color files are also hash.
> 
> I'm not sure if the problem is scanimage or epson-sane is sending the
> data in the wrong byte-order.
> 


Hi.

I did some test with 16 bit images and xv and display/imagemagick.

1) 16 ascii pnm images are displayed correct by xv, they are black in
display. The image contains values up to 6xxxx, so xv does it right and
display does it wrong.
2) there is no 16 bit pnm raw image type defined. So there can be no
wrong byte order. xv does read 16 bit raw pnm images in the byte order
of the machine (low byte first for ix68).

So I think display ane may be ee are wrong, not xv.

Bye
Oliver
-- 
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