Bug#236507: sane-utils: scanimage generates bad PPM files

2014-11-26 Thread Jörg Frings-Fürst

Hello,

no answer since 1 month.

So I close this 10 years old bug.


Thank you for spending your time.

If this bug still occurs please feel free to file a new bug.


CU
Jörg

-- 
pgp Fingerprint: 7D13 3C60 0A10 DBE1 51F8  EBCB 422B 44B0 BE58 1B6E
pgp Key: BE581B6E
CAcert Key S/N: 0E:D4:56

Jörg Frings-Fürst
D-54526 Niederkail

Threema: SYR8SJXB

IRC: j_...@freenode.net
 j_...@oftc.net


signature.asc
Description: This is a digitally signed message part


Bug#236507: sane-utils: scanimage generates bad PPM files

2014-10-26 Thread Jörg Frings-Fürst
tags 236507 + moreinfo
thanks



Hello,

sane-backends release 1.0.24-3 is now in testing.

Please can you check whether the same bug still exists?


CU
Jörg
-- 
pgp Fingerprint: 7D13 3C60 0A10 DBE1 51F8  EBCB 422B 44B0 BE58 1B6E
pgp Key: BE581B6E
CAcert Key S/N: 0E:D4:56

Jörg Frings-Fürst
D-54526 Niederkail

Threema-ID: SYR8SJXB

IRC: j_...@freenode.net, j_...@oftc.net

signature.asc
Description: This is a digitally signed message part.


Bug#236507: sane-utils: scanimage generates bad PPM files

2012-12-12 Thread Johann Klammer

Package: sane-utils
Version: 1.0.22-7.4

Hello,

I can confirm that scanimage truncates pnm files. I am using a brother 
DCP7010 print/scan combo on a LAN. The back-end seems to report the 
paper size wrongly or do faulty rounding (I think it should truncate to 
nearest pixel, while in fact it just rounds to the nearest millimeter, 
which is, upwards in this particular case). Strangely enough the 
individual lines are not misaligned, just some at the bottom are missing.


I used following command line:
scanimage -d net:192.168.0.3:brother2:bus3;dev1 --mode True Gray 
--resolution 200 --buffer-size=1  /mnt/sda1/asdf.pnm


and got the following messages back:
scanimage: rounded value of br-x from 210 to 209.981
scanimage: rounded value of br-y from 297 to 296.973


scanimage --help shows:

Usage: scanimage [OPTION]...

Start image acquisition on a scanner device and write image data to
standard output.

Parameters are separated by a blank from single-character options (e.g.
-d epson) and by a = from multi-character options (e.g. 
--device-name=epson).

-d, --device-name=DEVICE   use a given scanner device (e.g. hp:/dev/scanner)
--format=pnm|tiff  file format of output file
-i, --icc-profile=PROFILE  include this ICC profile into TIFF file
-L, --list-devices show available scanner devices
-f, --formatted-device-list=FORMAT similar to -L, but the FORMAT of the 
output

   can be specified: %d (device name), %v (vendor),
   %m (model), %t (type), %i (index number), and
   %n (newline)
-b, --batch[=FORMAT]   working in batch mode, FORMAT is `out%d.pnm' or
   `out%d.tif' by default depending on --format
--batch-start=#page number to start naming files with
--batch-count=#how many pages to scan in batch mode
--batch-increment=#increase page number in filename by #
--batch-double increment page number by two, same as
   --batch-increment=2
--batch-prompt ask for pressing a key before scanning a page
--accept-md5-only  only accept authorization requests using md5
-p, --progress print progress messages
-n, --dont-scanonly set options, don't actually scan
-T, --test test backend thoroughly
-A, --all-options  list all available backend options
-h, --help display this help message and exit
-v, --verbose  give even more status messages
-B, --buffer-size=#change input buffer size (in kB, default 32)
-V, --version  print version information
scanimage: rounded value of br-x from 210 to 209.981
scanimage: rounded value of br-y from 297 to 296.973

Options specific to device `net:192.168.0.3:brother2:bus3;dev1':
  Mode:
--mode Black  White|Gray[Error Diffusion]|True Gray|24bit 
Color|24bit Color[Fast] [24bit Color]

Select the scan mode
--resolution 100|150|200|300|400|600|1200|2400|4800|9600dpi [200]
Sets the resolution of the scanned image.
--source FlatBed [FlatBed]
Selects the scan source (such as a document-feeder).
--brightness -50..50% (in steps of 1) [inactive]
Controls the brightness of the acquired image.
--contrast -50..50% (in steps of 1) [inactive]
Controls the contrast of the acquired image.
  Geometry:
-l 0..210mm (in steps of 0.008) [0]
Top-left x position of scan area.
-t 0..297mm (in steps of 0.008) [0]
Top-left y position of scan area.
-x 0..210mm (in steps of 0.008) [209.981]
Width of scan-area.
-y 0..297mm (in steps of 0.008) [296.973]
Height of scan-area.

Type ``scanimage --help -d DEVICE'' to get list of all options for DEVICE.

List of available devices:
net:192.168.0.3:brother2:bus3;dev1



Installed stuff:

dpkg -l \*sane\*
Desired=Unknown/Install/Remove/Purge/Hold
| 
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend

|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name   Version  Architecture Description
+++-==---=
un  iamerican-insa none(no description available)
un  ibritish-insan none(no description available)
ii  libsane:i386   1.0.22-7.4   i386 API library for scanners
ii  libsane-common 1.0.22-7.4   i386 API library for scanners -- 
docum

un  libsane-extras none(no description available)
un  libwine-sane   none(no description available)
ii  sane   1.0.14-9 i386 scanner graphical frontends
ii  sane-utils 1.0.22-7.4   i386 API library for scanners -- 
utili
ii  xsane  0.998-3+b1   i386 featureful graphical 
frontend for
ii  xsane-common   0.998-3  all  featureful graphical 
frontend for



--
To 

Bug#236507: sane-utils: scanimage generates bad PPM files

2012-12-12 Thread Johann Klammer

Just did some more reading...
Seems I am using the binary brother brscan2 driver. It does replace some 
parts of the sane infrastructure... So I do not know if the observed 
behaviour is caused by sane-utils or (more likely) brscan2.


dpkg -l \*brscan2\*
Desired=Unknown/Install/Remove/Purge/Hold
| 
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend

|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ NameVersion  Architecture Description
+++-===---
ii  brscan2 0.2.1i386 Brother Scanner Driver

dpkg -L brscan2
/.
/usr
/usr/bin
/usr/lib
/usr/lib/libbrcolm2.so.1.0.0
/usr/lib/libbrscandec2.so.1.0.0
/usr/lib/sane
/usr/lib/sane/libsane-brother2.so.1.0.7
/usr/local
/usr/local/Brother
/usr/local/Brother/sane
/usr/local/Brother/sane/Brsane2.ini
/usr/local/Brother/sane/GrayCmData
/usr/local/Brother/sane/GrayCmData/AL
/usr/local/Brother/sane/GrayCmData/AL/brmsl09f.cm
/usr/local/Brother/sane/GrayCmData/AL/vssver.scc
/usr/local/Brother/sane/GrayCmData/ALL
/usr/local/Brother/sane/GrayCmData/ALL/brmsl08f.cm
/usr/local/Brother/sane/GrayCmData/ALL/vssver.scc
/usr/local/Brother/sane/brsaneconfig2
/usr/local/Brother/sane/brsanenetdevice2.cfg
/usr/local/Brother/sane/setupSaneScan2
/usr/bin/brsaneconfig2
/usr/lib/libbrcolm2.so
/usr/lib/libbrcolm2.so.1
/usr/lib/libbrscandec2.so
/usr/lib/libbrscandec2.so.1
/usr/lib/sane/libsane-brother2.so
/usr/lib/sane/libsane-brother2.so.1

Their source code can be downloaded from their support pages..
it is probably more recent than my installed binaries...

In file brscan/backend_src/brother_modelinf.c in function 
GetSupportScanAreaHeight(), the height is hardcoded to 355.6
there's also a 297.0 which is disabled by an #if 0. The whole thing 
looks a bit incomplete..


Investigating the generated pnm file shows a header that claims
P5 (graymap)
1648x2337 pixels
255 maxvalue(=single byte pixels)
counting the bytes gives:
0x00399605-0x25=0x3995E0
dividing by the width gives:
2290 lines(decimal,exactly)
This is 47 lines difference(missing).
Scans were done at 200 DPI, so each pixels is 1/200 inch.
47*1/200=0.235 inch
1inch=25.4 mm=5.969mm missing from bottom.
This is more than just the rounding error...


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org