[sane-devel] backend Kodak i260 Image depth 48 bits stream. How is coded?
Jose Guadalupe Osuna Chavez
jose.chaves at sat.gob.mx
Thu Aug 28 19:55:59 UTC 2008
Hi:
I'm making a backend for a i260 kodak scanner on Linux, but now I'm stuck trying to decode the image's stream.
As a result of analyzing the driver's log on window, all appears to show that the scanner only works with depth of 48 bits per pixel. Every time that I'd send a SetWindow command with another pixel depth, an error occurs.
The SetWindow command on window's log is the next:
01904 104543281 kdsprot 7703 183 S5 CMD : SetWindow
01905 104543281 kdsprot 7711 183 S5 DMP : aWindowDescLength: 0
01906 104543281 kdsprot 7712 183 S5 DMP : aWindowDataLength: 46
01907 104543281 kdsprot 7713 183 S5 DMP : aWindowId: 3
01908 104543281 kdsprot 7714 183 S5 DMP : aX_resolution: 200
01909 104543281 kdsprot 7715 183 S5 DMP : aY_resolution: 200
01910 104543281 kdsprot 7716 183 S5 DMP : aUpperLeft_X: 0
01911 104543281 kdsprot 7717 183 S5 DMP : aUpperLeft_Y: 0
01912 104543281 kdsprot 7718 183 S5 DMP : aWidth: 14400
01913 104543281 kdsprot 7719 183 S5 DMP : aLength: 20400
01914 104543281 kdsprot 7720 183 S5 DMP : aBrightness: 0
01915 104543281 kdsprot 7721 183 S5 DMP : aThreshold: 0
01916 104543281 kdsprot 7722 183 S5 DMP : aContrast: 0
01917 104543281 kdsprot 7723 183 S5 DMP : aImageComposition: 5
01918 104543281 kdsprot 7724 183 S5 DMP : aBitsPerPixel: 48
01919 104543281 kdsprot 7725 183 S5 DMP : aHalftonePattern: 0
01920 104543281 kdsprot 7726 183 S5 DMP : aPaddingType: 0
01921 104543281 kdsprot 7727 183 S5 DMP : aRif: 0
01922 104543281 kdsprot 7728 183 S5 DMP : aBitOrdering: 1
01923 104543281 kdsprot 7729 183 S5 DMP : aCompressionType: 0
01924 104543281 kdsprot 7730 183 S5 DMP : aCompressionArgument: 0
01925 104543281 kdsprot 7731 183 S5 DMP : aImageOverscan: 0
01926 104543281 kdsprot 7732 183 S5 DMP : aColorDropoutColor: 0
01927 104543281 kdsprot 7733 183 S5 DMP : aColorDropoutBackground: 245
01928 104543281 kdsprot 7734 183 S5 DMP : aColorDropoutThreshold: 175
01929 104543281 kdsprot 7735 183 S5 DMP : aImageMagnificationFactor: 10
01930 104543281 kdsprot 1108 183 S5 >>> KDSPROT::Escape(0x2a24,10891898,54,0)
01931 104543281 wr_cwirebase 2307 183 S5 ARG : command/2a 24 buffer/0x10891898 buflen/54 direction/0x0 mode:1
01932 104543281 wr_cwirebase 2314 183 S5 SRB : flags/0x00 cdblen/10
01933 104543281 wr_cwirebase 2374 183 S5 CDB : 24 00 00 00 00 00 00 00 36 00
01934 104543281 wr_cwirebase 2437 183 S5 PUT :
00 00 00 00 00 00 00 2e 03 00 00 c8 00 c8 00 00
00 00 00 00 00 00 00 00 38 40 00 00 4f b0 00 00
00 05 30 00 00 00 00 01 00 00 00 00 00 00 00 00
00 00 00 f5 af 0a
The scanner works fine, but after the ReadImage command I don't understand the data stream of 48 bits. I'll like to convert this image to 8 bits grayscale and Bitonal after.
Does anybody have any information about this image stream? Thank you
The stream show two bytes with 80 80 every four, just like this on linux.
[kodak] sane_read: start
[kodak] read_from_scanner: start
[kodak] read_from_scanner: to:7920000 rx:0 re:7920000 bu:32766 pa:32766
[kodak] do_cmd: start
[kodak] cmd: writing 10 bytes
[kodak] cmd: >>
[kodak] 000: 28 00 00 00 00 00 00 7f fe 00 /* ReadImage command */
[kodak] in: reading 32766 bytes
[kodak] in: <<
[kodak] 000: 09 09 80 80 0b 0a 80 80 07 07 80 80 08 09 80 80 /* Image stream */
[kodak] 010: 09 09 80 80 0a 0b 80 80 0a 09 80 80 09 09 80 80
[kodak] 020: 0b 0a 80 80 08 09 80 80 0b 0c 80 80 0a 09 80 80
[kodak] 030: 0b 0a 80 80 09 0a 80 80 0b 0b 80 80 0b 09 80 80
[kodak] 040: 08 07 80 80 08 0a 80 80 0c 0b 80 80 09 08 80 80
[kodak] 050: 08 07 80 80 0a 0b 80 80 0b 0b 80 80 09 09 80 80
[kodak] 060: 0b 0a 80 80 09 08 80 80 09 09 80 80 0a 0b 80 80
......
Jose Osuna
Coordinación Técnica
CRDC Cd. Obregon
Vangent de Mexico, S.A. de C.V.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20080828/3d46c044/attachment-0001.htm
More information about the sane-devel
mailing list