----- Original Message -----
from: "Lawrence Glaister" <lg@jfm.bc.ca>
to: <sane-devel@mostang.com>
date: 3:15 / 5 / Oct. / 2000
subject: Re: The problem of xscanimage by CanoscanFB620S
> The bytesperline looks ok if you are doing a color scan of 637 pixels/line
> 637*3 = 1911 bytes. There is one byte each for red/green/blue pixel data.
> I'm not sure what your other problem could be. Can you scan at any
> resolution successfully? How about greyscale scans?
> =======================================================
> Lawrence Glaister VE7IT email: lg@jfm.bc.ca
> 1462 Madrona Drive http://jfm.bc.ca
> Nanoose Bay BC Canada
> V9P 9C9
> =======================================================
Thank you, Mr. Lawrence Glaister !
I found my thought was wrong as Mr.Abel Deuring gave me a good advice.
I can't scan at any resolution and the greyscale also scans makes abnormal
image.
I changed 'width' and 'length' in canon.c and canon-sane.c as follows.
width = (SANE_UNFIX(s->val[OPT_BR_X].w - s->val[OPT_TL_X].w) + 0.05)
* s->hw->info.mud / MM_PER_INCH;
length = (SANE_UNFIX(s->val[OPT_BR_Y].w - s->val[OPT_TL_Y].w) + 0.05)
* s->hw->info.mud / MM_PER_INCH;
This changing resolved a part of the problem.
The scanimage is not diagonal !
Thanks to Mr.Abel's help, I could do this.
But the problem is not resolved completely.
1. The xscanimage by CanoscanFB620S makes too many long and narrow images.
2. It makes too much black blank below images.
3. The top of image is not scanned.
4. The button 'negative' in xscanimage is disabled.
I think a reason of the problem(1,2,3) is the following.
This is a part of a debug-file by the normal xscanimage on Canoscan600(this
model is supported by canon backend). I have got this file from my friend.
================================================================
[canon] >> sane_start
[canon] >> sane_get_parameters
[canon] sane_get_parameters: width='5102', xres='37', mud='600'
[canon] sane_get_parameters: length='6990', yres='37', mud='600'
[canon] sane_get_parameters: pixels_per_line='314', lines='431'
[canon] sane_get_parameters: xres='0', yres='0', pixels_per_line='314',
bytes_per_line='942', lines='431'
[canon] << sane_get_parameters
[canon] s->width='5102', s->length='6990'
[canon] RIF=0, GRC=0, Mirror=0, AE=0
[canon] HR=255, SR=0, HG=255, SG=0, HB=255, SB=0
[canon] >> set_window
[canon] << set_window
[canon] >> get_window
[canon] << get_window
[canon] xres=37
[canon] yres=37
[canon] ulx=0
[canon] uly=0
[canon] width=5102
[canon] length=6990
[canon] >> scan
[canon] << scan
[canon] >> get_data_status
[canon] << get_data_status
[canon] Magnified Width=942 <=== Look at this number(A) !
[canon] Magnified Length=431<=== Look at this number(B) !
[canon] Data=406002 bytes
[canon] 314 pixels per line, 942 bytes, 431 lines high, total 406002 bytes,
dpi=37
[canon] << sane_start
[canon] >> sane_get_parameters
[canon] sane_get_parameters: xres='37', yres='37', pixels_per_line='314',
bytes_per_line='942', <=== Look at this number(A) !
lines='431' <========== Look at this number(B) !
[canon] << sane_get_parameters
[canon] >> sane_set_io_mode
[canon] << sane_set_io_mode
[canon] >> sane_read
[canon] >> read_data
[canon] << read_data
=================================================================
The number of Magnified Width is equal to the number of bytes_per_line.
The number of Magnified Length is equal to the number of lines.
The following is a debug-file the abnormal xscanimage on CanoscanFB620S(its
sane was changed in the way Mr.Abel taught me.)
=================================================================
[canon] >> sane_start
[canon] >> sane_get_parameters
[canon] sane_get_parameters: width='5104', xres='75', mud='600'
[canon] sane_get_parameters: length='7016', yres='75', mud='600'
[canon] sane_get_parameters: pixels_per_line='638', lines='877'
[canon] sane_get_parameters: xres='0', yres='0', pixels_per_line='638',
bytes_per_line='1914', lines='877'
[canon] << sane_get_parameters
[sanei_init_debug]: Setting debug level of sanei_scsi to 128.
[canon] s->width='5104', s->length='7016'
[canon] RIF=1, GRC=0, Mirror=0, AE=0
[canon] HR=255, SR=0, HG=255, SG=0, HB=255, SB=0
[canon] >> set_window
[sanei_scsi] scsi_req_enter: entered 0x8080e28
[sanei_scsi] sanei_scsi_req_wait: waiting for 0x8080e28
[sanei_scsi] sanei_scsi.issue: 0x8080e28
[sanei_scsi] sanei_scsi_req_wait: read 36 bytes
[sanei_scsi] sanei_scsi_req_wait: SCSI command complained: Success
[canon] << set_window
[canon] >> get_window
[sanei_scsi] scsi_req_enter: entered 0x8080e28
[sanei_scsi] sanei_scsi_req_wait: waiting for 0x8080e28
[sanei_scsi] sanei_scsi.issue: 0x8080e28
[sanei_scsi] sanei_scsi_req_wait: read 108 bytes
[canon] << get_window
[canon] xres=600
[canon] yres=600
[canon] ulx=0
[canon] uly=0
[canon] width=5104
[canon] length=7016
[canon] >> scan
[sanei_scsi] scsi_req_enter: entered 0x8080e28
[sanei_scsi] sanei_scsi_req_wait: waiting for 0x8080e28
[sanei_scsi] sanei_scsi.issue: 0x8080e28
[sanei_scsi] sanei_scsi_req_wait: read 36 bytes
[canon] << scan
[canon] >> get_data_status
[sanei_scsi] scsi_req_enter: entered 0x8080e28
[sanei_scsi] sanei_scsi_req_wait: waiting for 0x8080e28
[sanei_scsi] sanei_scsi.issue: 0x8080e28
[sanei_scsi] sanei_scsi_req_wait: read 64 bytes
[canon] << get_data_status
[canon] Magnified Width=638 <==== Look at this number(A) !
[canon] Magnified Length=7016 <=== Look at this number(B) !
[canon] Data=4476208 bytes
[canon] 638 pixels per line, 1914 bytes, 877 lines high, total 1678578
bytes, dpi=75
[canon] << sane_start
[dll] get_parameters(handle=0x8099990,params=0x80a3318)
[canon] >> sane_get_parameters
[canon] sane_get_parameters: xres='75', yres='75', pixels_per_line='638',
bytes_per_line='1914', <==== Look at this number(not A) !
lines='877' <============ Look at this number(not B) !
[canon] << sane_get_parameters
[dll] set_io_mode(handle=0x8099990,nonblocking=1)
[canon] >> sane_set_io_mode
[canon] << sane_set_io_mode
[dll] read(handle=0x8099990,data=0xbfffcc1c,maxlen=8192,lenp=0xbfffcc18)
[canon] >> sane_read
[canon] >> read_data
==================================================================
I think the number of 'Magnified Width' must be equal to the number of
'bytes_per_line' and
the number of 'Magnified Length' must be equal to the number of 'lines'.
I think a part to change is a source of 'Magnified Width or Length' and the
source is the function
of 'get_data_status' in "canon-scsi.c".
But I don't know the meaning of cmd[0],cmd[1].....cmd[n].
What does change, when I change the number of cmd[n] ?
Mitsuru Okaniwa
-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
This archive was generated by hypermail 2b29 : Sun Oct 08 2000 - 07:55:22 PDT