So, renaming my image from the directly connected method to pmn allows me to view it. Now to find out what I need to get a jpeg, tiff, png images.
On Sat, Jan 6, 2018 at 8:54 PM, Jeff Sadowski <jeff.sadow...@gmail.com> wrote: > interesting I searched for "scanimage # sane data follows" and came across > > https://github.com/kkaempf/sane-backends/blob/master/frontend/scanimage.c > > and looking at that it looks like I was getting a pnm header even > though I asked for a jpg. > maybe I need to install jpg packages to use scanimage to output a jpeg? > > On Fri, Jan 5, 2018 at 2:53 PM, Jeff Sadowski <jeff.sadow...@gmail.com> wrote: >> Server side with saned >> >> root@raspberrypi:~:x86$ while [ 1 ];do saned -d 128;done >> [saned] main: starting debug mode (level 2) >> [saned] saned (AF-indep+IPv6) from sane-backends 1.0.24 starting up >> [saned] do_bindings: [0] bind failed: Address already in use >> [saned] check_host: access by remote host: ::ffff:192.168.1.252 >> [saned] init: access granted to apache@::ffff:192.168.1.252 >> >> gets to 96%ish then >> >> [saned] process_request: bad status 22 >> [saned] bailing out, waiting for children... >> [saned] bail_out: all children exited >> [saned] main: starting debug mode (level 2) >> [saned] saned (AF-indep+IPv6) from sane-backends 1.0.24 starting up >> [saned] do_bindings: [0] bind failed: Address already in use >> ^C >> >> >> >> On Fri, Jan 5, 2018 at 2:44 PM, Jeff Sadowski <jeff.sadow...@gmail.com> >> wrote: >>> I started my scanner testing with my project. :-) My project phpsaneng >>> seems to be working. >>> >>> The way I want to use my scanner, not so much. >>> >>> Maybe one of you would know what is happening here. I currently have 2 >>> ways to connect to my scanner. Via saned or using scanimage directly. >>> >>> I was surprised that both methods fail in two different ways. >>> >>> using saned from a second server: >>> >>> /usr/bin/scanimage "-v" "-p" "--batch=preview.jpg" "--batch-count" >>> "1" "--format" "jpeg" "-l" "0" "-t" "0" "-x" "215.9" "-y" "355.6" "-d" >>> "net:192.168.1.27:brother2:bus1;dev1" >>> >>> results in >>> >>> scanimage: rounded value of br-x from 215.9 to 215.88 >>> scanimage: rounded value of br-y from 355.6 to 355.567 >>> Scanning 1 page, incrementing by 1, numbering from 1 >>> Scanning page 1 >>> scanimage: scanning image of size 1648x2314 pixels at 24 bits/pixel >>> scanimage: acquiring RGB frame >>> Progress: 96% >>> scanimage: min/max graylevel value = 11/255 >>> Application transferred too few scanlines >>> >>> hexdump -c preview.jpg.part|head looks like so >>> >>> 0000000 377 330 377 340 \0 020 J F I F \0 001 001 001 \0 310 >>> 0000010 \0 310 \0 \0 377 333 \0 C \0 \b 006 006 \a 006 005 \b >>> 0000020 \a \a \a \t \t \b \n \f 024 \r \f \v \v \f 031 022 >>> 0000030 023 017 024 035 032 037 036 035 032 034 034 $ . ' >>> 0000040 " , # 034 034 ( 7 ) , 0 1 4 4 4 037 ' >>> 0000050 9 = 8 2 < . 3 4 2 377 333 \0 C 001 \t \t >>> 0000060 \t \f \v \f 030 \r \r 030 2 ! 034 ! 2 2 2 2 >>> 0000070 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 >>> * >>> 0000090 2 2 2 2 2 2 2 2 2 2 2 2 2 2 377 300 >>> >>> I can view this file in most image viewers >>> >>> directly from the server connected to the printer (a raspberry pi with >>> exagear to run the brother software) >>> >>> using >>> >>> /usr/bin/scanimage "-v" "-p" "--batch=preview.jpg" "--batch-count" >>> "1" "--format" "jpeg" "-l" "0" "-t" "0" "-x" "215.9" "-y" "355.6" "-d" >>> "brother2:bus1;dev1" >>> >>> results in >>> >>> scanimage: rounded value of br-x from 215.9 to 215.88 >>> scanimage: rounded value of br-y from 355.6 to 355.567 >>> Scanning 1 pages, incrementing by 1, numbering from 1 >>> Scanning page 1 >>> scanimage: scanning image of size 1648x2314 pixels at 24 bits/pixel >>> scanimage: acquiring RGB frame >>> Progress: 100% >>> scanimage: min/max graylevel value = 11/255 >>> scanimage: read 11440416 bytes in total >>> Scanned page 1. (scanner status = 5) >>> >>> hexdump -c preview.jpg|head >>> >>> 0000000 P 6 \n # S A N E d a t a f >>> 0000010 o l l o w s \n 1 6 4 8 2 3 1 4 >>> 0000020 \n 2 5 5 \n \f 021 031 \r 022 032 \f 021 030 \f 021 >>> 0000030 030 \f 021 030 \f 021 030 \f 021 030 \r 022 031 \r 022 031 >>> 0000040 \f 023 031 \f 021 030 \f 021 030 \f 021 030 \f 021 031 \f >>> 0000050 021 030 \f 021 030 \f 021 030 \v 020 027 \f 021 030 \r 022 >>> 0000060 031 \v 020 027 \r 022 031 \f 023 031 \f 021 030 \f 021 030 >>> 0000070 \v 020 027 \r 022 032 \r 022 031 \f 021 030 \f 021 030 \f >>> 0000080 021 030 \f 021 030 \f 021 030 \v 020 027 \f 021 030 \f 021 >>> 0000090 030 \f 021 030 \f 021 030 \r 022 031 \r 024 032 \f 023 031 >>> >>> And I can clearly see text in the file that doesn't look right. >>> >>> P6 >>> # SANE data follows >>> >>> Image viewers say it isn't an image. >>> >>> Any ideas what is going on given that data? >>> >>> Is there anything I can run to get more debug data? -- sane-devel mailing list: sane-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel Unsubscribe: Send mail with subject "unsubscribe your_password" to sane-devel-requ...@lists.alioth.debian.org