[sane-devel] bug repport + workaround sane-canon: Endian inverted data when scanning 48bbp raw mode pnm

Jean-Michel Vourgère contact_mlsane at nirgal.com
Sun Dec 25 17:33:33 UTC 2005


I think I found a bug in sane-canon:

Using a CanoScan FS2710 on a Pentium, scanimage and xscanimage in raw mode gives endian inverted data (12 bits per color per pixel in pnm files).

Using imagemagick on the raw data give images with noise. Switching bytes before using imagemagick' convert works ok.

The noise also appears in preview window when mode is raw, so the bug is probably in sane and not imagemagick.


A small program performing endian-swicthing 2bytes/channel pnm files can be found at http://www.nirgal.com/kod/swappnm.c

It may be usefull for debugging such problems in other cases.


I use Debian sid i686 binary release:

nirgal at zain:~$ scanimage -V
scanimage (sane-backends) 1.0.17; backend version 1.0.17
nirgal at zain:~$ xscanimage -V
xscanimage (sane-frontends) 1.0.14

Host: scsi0 Channel: 00 Id: 05 Lun: 00
  Vendor: CANON    Model: IX-27025E        Rev: 1.13
  Type:   Scanner                          ANSI SCSI revision: 02

Images were scaned with:
scanimage -v --resolution=2720 --mode Raw > image.pnm

I'll have access to that hardware until December 31st.



More information about the sane-devel mailing list