[sane-devel] Unsupported Scanner Epson Perfection V550

2015-04-06 Thread David Major
I am a novice.
I see no reference to V550 Photo
https://help.ubuntu.com/community/SANE%20-%20Installing%20a%20scanner%20that%20isn%27t%20auto-detected#Introduction
Neither is the scanner detected as per the above instructions.

Any suggestions?
Thanks
Dave Major
-- 
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

[sane-devel] [FYI] new ls5000 backend

2007-05-12 Thread Major A

 If anybody wants to do it, all the better, but if it makes the code as
 unreadable and stupid as it was in coolscan2.c (like parsing bytes from
 a string at runtime...) then I will not take such a patch nor help
 maintain a forked version.

Please note that the author of coolscan2 is reading this list and
might be offended by such unqualified and inappropriate remarks.

Or is my code really that bad? Or maybe the stupid functions you
refer to were added by others?

Trying to use the latest language features is one thing, writing
robust and portable code is another. If you can't read the latter,
there isn't much I can do.

  Andras


[sane-devel] [patch] --quality scan option for coolscan2 backend

2007-02-25 Thread Major A

 I finally started having a look at the coolscan2 backend. For my first
 patch I added a new option, --quality, that may be used to activate the
 high quality scan scanner option.

Thanks for taking over. I really don't have any time to spend on SANE
at the moment. But what, exactly, is the high-quality option? Do you
mean multisampling? For that to work, it's not sufficient to just set
the relevant bits before scanning, you also have to actively read out
the lines and sum them up yourself, the scanner doesn't do it for
you. Also, not that not all scanners support multisampling. Also, if
you mean multisampling, I'd call the option accordingly because
high-quality doesn't really mean a lot.

 My next work will be on activating a new option, --greyscale, in order
 to scan in greyscale instead of RGB.

Again, the scanner doesn't support that in hardware. And because it
doesn't, I think it's better to scan RGB and leave the conversion to
greyscale to the frontend or the user. (The scanner does have a
single-colour mode, but that isn't greyscale, you can select one of
the colour channels to be scanned exclusively, but I wouldn't call
that greyscale).

BTW, has anyone got the LS-50/5000 working in the end?

  Andras


[sane-devel] unsupported device info correction

2006-10-01 Thread Serge Major
Device information: Umax AstraSlim 1200 USB scanner. Power supplied from USB 
bus only.
Chips labels on the PCB is:

1. A3966SLB M148313 BPA
2. CSI 24WC16P 0013D (8-pin chip)
3. GRANDTECH GT-6816 F60685.1 0041 (that`s it)

Ouput of sane-find-scanner -v -v with root privilegies is:
---
device descriptor of 0x080d/0x0110 at 004:002
bLength   18
bDescriptorType   1
bcdUSB1.10
bDeviceClass  0
bDeviceSubClass   0
bDeviceProtocol   0
bMaxPacketSize0   64
idVendor  0x080D
idProduct 0x0110
bcdDevice 1.00
iManufacturer 0 ()
iProduct  0 ()
iSerialNumber 0 ()
bNumConfigurations1
 configuration 0
 bLength  9
 bDescriptorType  2
 wTotalLength 32
 bNumInterfaces   1
 bConfigurationValue  1
 iConfiguration   0 ()
 bmAttributes 160 (Remote Wakeup)
 MaxPower 500 mA
  interface 0
   altsetting 0
   bLength9
   bDescriptorType4
   bInterfaceNumber   0
   bAlternateSetting  0
   bNumEndpoints  2
   bInterfaceClass255
   bInterfaceSubClass 255
   bInterfaceProtocol 255
   iInterface 0 ()
endpoint 0
bLength   7
bDescriptorType   5
bEndpointAddress  0x81 (in 0x01)
bmAttributes  2 (bulk)
wMaxPacketSize64
bInterval 0 ms
bRefresh  0
bSynchAddress 0
endpoint 1
bLength   7
bDescriptorType   5
bEndpointAddress  0x02 (out 0x02)
bmAttributes  2 (bulk)
wMaxPacketSize64
bInterval 0 ms
bRefresh  0
bSynchAddress 0

trying to find out which USB chip is used
checking for GT-6801 ...
this is not a GT-6801 (bDeviceClass = 0)
checking for GT-6816 ...
This USB chip looks like a GT-6816

found USB scanner (vendor=0x080d, product=0x0110, chip=GT-6816) at 
libusb:004:002
---

Output of cat /proc/bus/usb/devices with root privilegies is:

T:  Bus=05 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 8
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor= ProdID= Rev= 2.06
S:  Manufacturer=Linux 2.6.17-1.2139_FC5 ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=:00:1d.7
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=256ms

T:  Bus=05 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0bda ProdID=0103 Rev= 1.1c
S:  Manufacturer=Generic
S:  Product=USB 2.0 Card Chip
S:  SerialNumber=050302014271000219
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

T:  Bus=04 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor= ProdID= Rev= 2.06
S:  Manufacturer=Linux 2.6.17-1.2139_FC5 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=:00:1d.3
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=080d ProdID=0110 Rev= 1.00
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor= ProdID= Rev= 2.06
S:  Manufacturer=Linux 2.6.17-1.2139_FC5 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=:00:1d.2
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc= 99/900 us (11%), #Int=  1, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor= ProdID= Rev= 2.06
S:  Manufacturer=Linux 2.6.17-1.2139_FC5 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=:00:1d.1
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  

[sane-devel] Nikon CoolScan IV and next sane release

2006-05-15 Thread Major A

Giuseppe, Henning,

 another problem I think I found on this patch is at about line 1525 of the
 patched file, where it is i = (xfer_len_in  0x3f); while it should be
 i = (xfer_len_in  0x3f); with a single ampersand.

I'm afraid I haven't had time recently to do anything about the
coolscan2 backend, and SANE-devel email delivery has been quite
intermittent over here (I only got one copy of this email, for
instance, although you sent it both to the list and to me separately).

I'm so tied up in other things that I won't have time to work on SANE
for a while, so I'd appreciate it if someone else took care of
coolscan2 instead. I only have an LS-4000 and therefore can't really
help with the LS-5*, which I've tried to get working several times by
remote access (without success, though). The one thing I'd like to
avoid is seeing SANE development retarded because of me.

I'd like to believe that the backend is written in a reasonably
readable way, so adding support for new scanners shouldn't be hard
provided the new code is either tested for backward compatibility or
made conditional based on the type of scanner. I've also found that
it's a good idea to use case switches for this without specifying a
default case -- gcc will then warn you if you've forgotten to list any
type of scanner.

  Andras


[sane-devel] Scanner Question

2005-06-08 Thread Major A
 I permitted to use my scanner to Andr=E1s Major, the SANE coolscan2 dri=
ver
 author, but he said that this scanner is enough different from Coolscan
 LS 40, so probably a new SANE backend will not be available very
 shortly. Archives of this list includes some recent messages about
 peoples actually working on it.

I tried to hack the driver to support the LS-50 and LS-5000, but never
got it to work. That was probably also because I don't have much time
to work on SANE right now. I have the specs from Nikon, but they give
very little information about what in the way SANE talks to the
scanners is wrong. It appears that the basic protocol is the same as
the LS-40 and LS-4000, but the new scanners appear to be more picky
about the exact way the commands are sent.

 The only problem I see is that this scanner, while really good, isn't
 fast. I do not have other scanners to compare it, but I wait 3.5 minute=
s
 for each 35mm image, at 4000dpi 24bit. This is on a powerbook that only
 have USB1.1. It may be different with USB2.0, but I don't think so sinc=
e
 powerbook CPU goes to 100% during the whole scan.

I think the port speed will make a huge difference.

What needs to be done about the LS-50/5000 is that someone has to take
a good look at the USB log of a Windows driver (or VueScan) and
compare it to that of SANE. I haven't got a time to do this, I'm
afraid (I tried, but gave up after I failed to find anything
obvious). In any case, the LS-40/4000 is pretty well supported by
SANE, any shortcomings in the latter can be fixed fairly easily
because that's the model I have myself.

  Andras



[sane-devel] Nikon Coolscan III not recognised.

2005-05-19 Thread Major A
 [john@ip68-11-45-233 john]$ SANE_DEBUG_COOLSCAN2=255 scanimage -L
 [sanei_debug] Setting debug level of coolscan2 to 255.
 [coolscan2] sane_init() called.
 [coolscan2] coolscan2 backend, version 0.1.8 initializing.
 [coolscan2] sane_get_devices() called.
 [coolscan2] sane_get_devices(): Reading config file.
 [coolscan2] cs2_open() called, with device = auto and interface = 0
 [coolscan2] sane_get_devices(): No devices detected.

OK, this means that either your scanner is not known to the SCSI
system, or that you don't have permissions to access its device
files. Please re-run this command as the superuser (root), if that
doesn't give any different output, then your scanner is most likely
not known to the SCSI system. Also, cat /proc/scsi/scsi lists the
known SCSI devices.

If you expect us to help, please do yourself a favour and type the
commands we give exactly as they are, including any _ and  
characters and a distinction between lowercase and uppercase.

  Andras



[sane-devel] Nikon Coolscan III not recognised.

2005-05-17 Thread Major A
 I hope that it is ok to post this here, if not let me know. I installed 
 ftp://rpmfind.net/linux/Mandrake/10.2/SRPMS/main/sane-1.0.15-7mdk.src.rpm
 and the dependancies and everything seemed to install properly. When I run 
 the 
 program from either the GUI interface or the command line or 
 sane-find-scanner it fails to find anything. My system is seeing the SCSI 
 interface which the scanner is attached to. Is there something I'm missing. 
 Any help would be greatly appreciated.

Make sure that the user running scanimage/xsane/xscanimage has
read/write permissions to the scanner's device file
(/dev/sg*). There's no need to change any configuration files, the
default must work just fine.

If this fails, please post the output of SANE_DEBUG_COOLSCAN2=255
scanimage -L.

  Andras



[sane-devel] Infrared channel

2005-02-22 Thread Major A
 - starting SANE 2 with, let's say 2 or three backends (in the end your Avision
   stuff, my Plustek backends (plustek, plustek_pp and u12, maybe some other 
   VOLUNTEERS - hell lot of work to do ;)

I've been suggesting that for months. As soon as a simple SANE2
front-end (scanimage) is available, I'm volunteering to adapt
coolscan2 fairly quickly. But first we'll have to decide how to
organize CVS so as to accommodate SANE2 (no fork please!), then it's
all downhill from there.

  Andras



[sane-devel] Re: SANE LS50ED

2005-02-09 Thread Major A
 i've put the full logs of the nikonscan communication with the coolscan LS50ED
 in 
 http://cvs.fzk.de/~ariel/linux/scanner/cs2usb.log.gz
 http://cvs.fzk.de/~ariel/linux/scanner/cs2usb.cleaned.log.gz

Thanks a lot Ariel. I have no time at all these days, anyone like to
volunteer to have a look?

  Andras



[sane-devel] quality?

2005-01-05 Thread Major A
 It seems that windows get much better results scanning negatives.
 Is it just me or could this be true? (smaller pixels, sharper results)

I don't know, I haven't ever scanned negatives under Windows. If you
follow the procedure I posted on this list several times in the past,
then you should get the best quality permitted by the scanner with
SANE.

  Andras



[sane-devel] Re: SANE LS50ED

2005-01-05 Thread Major A
 Any suggestions for further tests/debugging info is welcome.

What we need is someone to spare a few hours and check the USB log of
VueScan or Nikonscan against the Coolscan2 code. There's something the
scanner doesn't like which is probably not even prohibited by the
specs. Any takers? I can send you the latest version of Coolscan2 with
which I've been playing, and a log as well, just let me know.

  Andras



[sane-devel] Re: SANE LS50ED

2005-01-05 Thread Major A
 Oh. Weird, ok. I'll keep looking. Do you have access to the technical=20
 specs of the 50/5k?

Yes, and I can't see anything obviously wrong. But then I don't have
time to go through it in detail anyway.

 Could you send me said patch? I don't have the device (yet) but would=20
 like to look over it.

The patch is at the end of this email. Please give it a go.

  Andras


--- coolscan2.c 2004-10-18 17:19:15.0 +0100
+++ /tmp/coolscan2.c2005-01-05 12:15:39.0 +
@@ -43,7 +43,7 @@
=20
This file implements a SANE backend for Nikon Coolscan film scanners.
=20
-   Written by Andr=E1s G. Major (and...@users.sourceforge.net), 2001-200=
4.
+   Written by Andr=E1s Major (and...@users.sourceforge.net), 2001-2002.
=20
The developers wish to express their thanks to Nikon Corporation
for providing technical information and thus making this backend
@@ -56,7 +56,6 @@
 /*
Revision log:
=20
-   X
0.1.8, 27/09/2002, andras: added subframe and load options
0.1.7, 22/08/2002, andras: added exposure correction option
 and hack for LS-40 IR readout
@@ -80,6 +79,10 @@
 #include ctype.h
 #include unistd.h
 #include time.h
+/*
+#include limits.h
+#include sys/types.h
+*/
=20
 #include ../include/sane/sane.h
 #include ../include/sane/sanei.h
@@ -231,7 +234,6 @@
   /* device characteristics */
   char vendor_string[9], product_string[17], revision_string[5];
   cs2_type_t type;
-  int boundary_type;
   int maxbits;
   unsigned int resx_optical, resx_min, resx_max, *resx_list, resx_n_list=
;
   unsigned int resy_optical, resy_min, resy_max, *resy_list, resy_n_list=
;
@@ -1795,24 +1797,6 @@
   return SANE_STATUS_UNSUPPORTED;
 }
=20
-  switch (s-type)
-{
-case CS2_TYPE_LS30:
-case CS2_TYPE_LS2000:
-case CS2_TYPE_LS8000:
-  s-boundary_type =3D 1;
-  break;
-case CS2_TYPE_LS40:
-case CS2_TYPE_LS50:
-case CS2_TYPE_LS4000:
-case CS2_TYPE_LS5000:
-case CS2_TYPE_LS9000:
-  s-boundary_type =3D 2;
-  break;
-case CS2_TYPE_UNKOWN:
-  break;
-}
-
   if (sp)
 *sp =3D s;
   else
@@ -2072,6 +2056,7 @@
   size_t n_data, n_status;
   static SANE_Byte status_buf[8];
   int status_only =3D 0;
+  long nn; /* LL */
=20
   DBG (20, cs2_issue_cmd(): opcode =3D 0x%02x, n_send =3D %lu, n_recv =3D=
 %lu.\n,
s-send_buf[0], (unsigned long) s-n_send, (unsigned long) s-n_r=
ecv);
@@ -2146,6 +2131,10 @@
   status =3D SANE_STATUS_GOOD;
   break;
 case CS2_INTERFACE_USB:
+  /*  */
+  for (nn =3D 0; nn  s-n_cmd; nn ++)
+fprintf (stderr, %02x , s-send_buf[nn]);
+  fprintf (stderr, \n);
   status =3D sanei_usb_write_bulk (s-fd, s-send_buf, s-n_cmd);
   switch (cs2_phase_check (s))
{
@@ -2155,6 +2144,10 @@
  DBG (4, Error: cs2_issue_cmd(): Unexpected data out phase.\n);
  return SANE_STATUS_IO_ERROR;
}
+  /*  */
+  for (nn =3D 0; nn  n_data; nn ++)
+fprintf (stderr, %02x , s-send_buf[s-n_cmd+nn]);
+  fprintf (stderr, \n);
  status =3D
sanei_usb_write_bulk (s-fd, s-send_buf + s-n_cmd, n_data);
  break;
@@ -2676,86 +2669,45 @@
   int i_boundary;
   unsigned long lvalue;
=20
+  return SANE_STATUS_GOOD; /* */
+
   cs2_scanner_ready (s, CS2_STATUS_READY);
   cs2_init_buffer (s);
+  cs2_parse_cmd (s, 2a 00 88 00 00 03);
+  cs2_pack_byte (s, ((4 + s-n_frames * 16)  16)  0xff);
+  cs2_pack_byte (s, ((4 + s-n_frames * 16)  8)  0xff);
+  cs2_pack_byte (s, (4 + s-n_frames * 16)  0xff);
+  cs2_parse_cmd (s, 00);
=20
-  if (s-boundary_type =3D=3D 1)
-{
-  cs2_parse_cmd (s, 2a 00 88 00 00 03);
-  cs2_pack_byte (s, ((4 + s-n_frames * 16)  16)  0xff);
-  cs2_pack_byte (s, ((4 + s-n_frames * 16)  8)  0xff);
-  cs2_pack_byte (s, (4 + s-n_frames * 16)  0xff);
-  cs2_parse_cmd (s, 00);
-
-  cs2_pack_byte (s, ((4 + s-n_frames * 16)  8)  0xff);
-  cs2_pack_byte (s, (4 + s-n_frames * 16)  0xff);
-  cs2_pack_byte (s, s-n_frames);
-  cs2_parse_cmd (s, 00);
-  for (i_boundary =3D 0; i_boundary  s-n_frames; i_boundary++)
-   {
- lvalue =3D s-frame_offset * i_boundary + s-subframe / s-unit_mm;
- cs2_pack_byte (s, (lvalue  24)  0xff);
- cs2_pack_byte (s, (lvalue  16)  0xff);
- cs2_pack_byte (s, (lvalue  8)  0xff);
- cs2_pack_byte (s, lvalue  0xff);
-
- lvalue =3D 0;
- cs2_pack_byte (s, (lvalue  24)  0xff);
- cs2_pack_byte (s, (lvalue  16)  0xff);
- cs2_pack_byte (s, (lvalue  8)  0xff);
- cs2_pack_byte (s, lvalue  0xff);
-
- lvalue =3D s-frame_offset * i_boundary + s-subframe / s-unit_mm + =
s-frame_offset - 1;
- cs2_pack_byte (s, (lvalue  24)  0xff);
- cs2_pack_byte (s, (lvalue  16)  0xff);
- cs2_pack_byte (s, (lvalue  8)  0xff);
- cs2_pack_byte (s, lvalue  0xff

[sane-devel] Re: SANE LS50ED

2005-01-05 Thread Major A
 I saw your patch to the list also, so i will try that one instead of (or in
 addition to) the normal code. Which log can you send? the one of the 
 Nikonscan?

Use the code with caution, I realized after posting that I commented
out a few parts of the code just to eliminate possible sources of
error. This means that some features would be missing (i.e., the
scanner won't set focus before the scan) even if it worked with the
scanner.

 I hope i can reproduce that, but if you have it at habd it is also welcome.

I can have a look and find it, please remind me. I can't remember what
log it was, someone else sent it to me, I think it's Nikonscan.

  Andras



[sane-devel] Re: SANE LS50ED

2004-12-15 Thread Major A
 So I've been looking through the code and the specs and couldn't really 
 find anything that differs between the LS50ED specs and the current 
 coolscan2 code. Here's a trivial patch to enable the detection of the 
 LS50 and LS5000, maybe this is all that is required to get these devices 
 to work for a start. You may need to adjust usb IDs too, not sure.
 
 johannes

That's my problem exactly. I've tried the patch you attached, and a
few things more, without any success so far.

There's one major difference between the specs and the code: the
LS-50/5k doesn't support Boundary information, only
Boundary2. I've changed the code (not in CVS yet) to reflect that,
no success nevertheless.

  Andras



[sane-devel] sane-coolscan2.

2004-12-14 Thread Major A
 I have a Nikon coolscan LS-40.
 I run it under FreeBSD and everything works fine

Good to hear that.

 but I cant choose grayscale or any colormode at all.

The scanner doesn't support anything but RGB(+I). I made the decision
not to include code that converts from RGB to greyscale into the
backend, this should really be done on the frontend side or in GIMP or
similar.

 Hm. What about ICE. Does it work with sane?

It isn't implemented yet. The IR readout works, but the driver side of
ICE is not yet available in SANE. It isn't simply a hardware feature
that needs enabling.

  Andras



[sane-devel] sane-coolscan2.

2004-12-14 Thread Major A
  The scanner doesn't support anything but RGB(+I). I made the decision
  not to include code that converts from RGB to greyscale into the
  backend, this should really be done on the frontend side or in GIMP or
  similar.
 Are you sure? I think I read somewhere that the scanner support grayscale,
 RGB and CMYK.

The scanner samples four colours: RGB + IR. There's nothing else the
scanner can output, and because of the way it's designed, it can't
even sample greyscale. Any conversion to any other colour space must
be done in software. As far as I'm aware, scanners never support CMYK,
which is an anachronism anyway. Maybe scanner _drivers_ do, but that's
another story.

  It isn't implemented yet. The IR readout works, but the driver side of
  ICE is not yet available in SANE. It isn't simply a hardware feature
  that needs enabling.
 What do you mean? I need it? :P But do you know another tool for removing
 dust and scratches?

ICE is a combination of an IR channel being supplied by the scanner
and some filtering code that makes use of it. The latter isn't
implemented in SANE yet.

 But it would be nice to have it supported in hardware.

ICE is not a pure hardware feature, there's nothing we can do about
that.

  Andras



[sane-devel] is coolscan2 maintained?

2004-10-07 Thread Major A
 I am trying to get in touch with the coolscan2 backend author but I got
 no replies neither to private emails, neither in this list.
 I even checked that his last commit is dated january 2003, so I am
 wondering if he is still working at this project.

Sorry for not replying, I've had a busy time at work. I'm maintaining
coolscan2, but I need help with a few things. Here's the list of the
most important tasks still to be done:

- get LS50 and LS5000 to work, maybe LS9000 too.

- fix frame offset on LS4000 (should be easy, I just haven't had the
  time yet).

- add multiscan for those models that support it.

- fix positioning with LS8000.

I tried to get the first point done a few times, but it has proved a
bit difficult with no direct access to a scanner. If anyone could work
out what needs to be done, I'd be happy to incorporate it into the
code. Same goes for all other tasks. Since I have an LS4000, I'll
probably do points 2 and 3 myself.

With respect to all points above except multiscanning, there is no
more information that I can find in the Nikon specs that could
help. These things have to be solved via reverse engineering (looking
at logs).

Please do NOT contact me privately. If you have a question, please
post it on the list, I subscribe to it, and even if I don't reply,
someone else might help you.

  Andras



[sane-devel] coolscan ls 4000 ED xsane default settings

2004-07-15 Thread Major A
 Since a week I'm experimenting with a nikon coolscan LS 4000 ED. Using 
 sane, xsane xscanimage I find it realy difficult to get good scanning 
 result concerning color. I'm scanning color slides (dia). I tried 
 different settings, the automatic exposure etc. Unfortunatly without 
 good result. So I gave up.
 
 I have general good succes with vuescan. So it is not the scanner. 
 Therefor I'm looking for propper settings to use with the coolscan LS 
 4000 ED. Is there someone who would like to share?

The scanner requires proper colour balance and gamma settings. Colour
balance is usually achieved by doing an AE with WB (for slide film),
then you can adjust the exposure multiplier to fill the histogram as
efficiently as you can. Finally, adjust gamma to suit your
requirements. I use a gamma between 2 and 3 almost all the time, 2.4
is normal, higher values are useful for certain films such as Kodak
P1600.

This goes for all Coolscans, BTW, I guess VueScan just does some of
this automatically.

  Andras



[sane-devel] discussion: Future of SANE-project

2004-07-12 Thread Major A
 I am really confused :)
 I was under the impression that the SANE project was proposing a better 
 alternative to the TWAIN interface. Better, meaning that the backend is 
 written once and is cross platform. That's what I understood from the intro 
 page on the web-site (I pasted part of the intro here for your convenience).

SANE makes it possible to have a frontend work with many different
scanners, thus saving a lot of time and effort for developers. TWAIN
it a simple interface between applications and a scanner
frontend. It's not required for running the scanner, it doesn't save
the developers any time or effort, but is demanded by almost everyone
who buys a scanner for use under Windows or MacOS.

In the long run, we'll have to make something like TWAIN too, but for
the time being, frontends (xscanimage and xsane) have code for
directly interfacing with the GIMP (and maybe others I'm not aware
of). There's no standard interface right now, that's why you can't
scan using SANE directly from within most other graphical
applications.

  Andras



[sane-devel] Nikon Coolscan V

2004-07-11 Thread Major A
Uli,

 Is anybody working on a backend for this scanner?

I am. It isn't going very well because I don't own a new-generation
Coolscan (LS-50/5000/9000). Could you please send me your patches or
code so that I can have a look? I've done a few changes myself (not in
CVS yet) but without much success. Can't check for resetting and
ejecting though because I only have remote access to the scanner.

  Andras



[sane-devel] discussion: Future of SANE-project

2004-07-11 Thread Major A
 But, if the ultimate goal of SANE is to supplant TWAIN as the
 standard for accessing image devices, shouldn't more effort be put

I don't think it is. TWAIN and SANE act on completely different
levels. I suppose that once a sufficiently large number of
manufacturers support SANE with their code (binary or open-source),
they will begin to see that there's no point in wasting time and money
writing a separate Windows/MacOS driver, they will just use SANE on
these platforms too, with the cross-platform SANE backend they had to
write anyway (possibly with their own frontend optimized for their
scanners). TWAIN is still going to be the interface between the
frontend and the application the image is to be imported to.

 Perhaps working examples demonstrating how scanner makers can
 leverage their investment in TWAIN support while migrating to SANE
 might be useful for getting scanner makers to take notice of
 SANE. If an upgrade path was readily shown, techno-geeks at the
 manufacturer might prefer and sell the SANE idea to managers within
 the company.

I don't think we can do a lot at the moment. There's no update path
from TWAIN to SANE that I can see, and you can't tell who the
techno-geeks in a company are without having had prior contact with
them. I think that more and more developers of proprietary software
realize that open-source can save them money and effort and create
superior products (they already see that the first time they pop that
Knoppix CD into their Windows computer), so it's only a matter of time
before they start lobbying within the company.

 Formal propoganda of industry heavyweight support (a consortium of
 scanner makers and front-end application development houses) on the
 web-site might make other makers feel the need to join in.

That sounds a bit like Darl McBride to me. I don't think any of us
hobbyist SANE developers have the financial and legal backing needed
to claim any heavyweight industry support.

 Without this kind of direction, I simply see SANE as being a
 hobbyist-level effort which is why I questioned the future of
 it. Thanks for listening and answering my questions.

That's how all open-source projects start out, just like Linux, GIMP,
etc. Look at what's become of them, I'm quite confident that SANE will
have a similar future.

  Andras



[sane-devel] Re: [sane-standard] Name of sane-backends CVS directory for version 2?

2004-07-11 Thread Major A
 I intend to create a new root directory (module) in CVS for SANE2
 (backends and standard). How should it be named? Options:

I would simply replace sane by sane2 everywhere. After all, it's
not only the backends but also frontends that are affected. So it would be

  sane2/sane-backends
  sane2/sane-frontends

and

  sane2-backends-2.x.y.tar.gz

My 2 pence,

  Andras



[sane-devel] list

2004-06-22 Thread Major A
 Strange. Unfortunately, alioth still doesn't sent any administrative
 messages (e.g. about mail problems) to me and all mails to
 sane-devel-admin are bounced. So I don't know the reason.
 
  Have there been any major events recently, especially related to the
  Coolscan2 driver?
 
 There are two bugs assigned to you in the bug tracker :-)

Great. One is a mystery to me (the LS-5000 is definitely NOT supported
as it is, I'm working on it), the other is a patch (submitted
yesterday) that I've been looking for for a while...

Damn, why do things have to be in so many different places? Thanks for
resubmitting that Debian bug report over here.

  Andras



[sane-devel] meaning of --contrast option to backend

2004-01-13 Thread Major A
 I was just curious if specifying a contrast argument to the backend
 is different from doing a default scan and adjusting the contrast in
 the gimp after the scan.

The contrast argument is not a standard option, so it depends on the
backend.

Gamma curve adjustment is often better done in the scanner, simply
because the scanner often has a deeper A/D converter than the 8 bits
per channel of the data you get from it. Therefore performing the
adjustment in the scanner gives better results.

On a slow computer, you can also save time by having the scanner do
the adjustment.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] Digital ICE support

2003-12-22 Thread Major A
  Agreed. I think there should be a sanei_* library that allows the code
  to be used in frontends or meta-backends, whichever solution is
  best. (Just think of a network scanner that is accessed by a handheld
  device -- you don't want the IR cleaning to be done on the handheld.)
 
 I recall that someone suggested that there should be something like a 
 mid-end (like saned) that does the correction.  This would keep front-ends 
 simple and provide a moer uniform way to access  features like IR-correction. 

That was me, and that's what I refer to as a meta-backend. Still, it's
best to implement the core defect removal functions in sanei_*, which
meta-backends have access to. One can then even use them in a
standalone post-process tool.

 I do not agree that there is little need for correction. When I try to 
 correct 
 using the simple GIMP-plugin, I find that both brightness and contrast of the 
 IR-chanel are critcal and they must be set for each image separately. Also, 
 the exposure for the IR-chanel seems important.

(It wasn't me who said that, BTW.)

Exposure for the IR channel is important of course, but on Coolscan
models, it's fixed anyway. But you're right, the algorithm must be
aware of exposure for the RGB channels, and their LUTs must be know
(best set to neutral). Gamma correction as specified by the user can
then be performed in the meta-backend after defect removal.

 Another reason why a mid-end could be better than the front-end is, that the 
 mid-end can scan always at full bit-resolution (12 bits on my LS-2000), do 
 the calculations and then round to 8 bits.

Agreed, though you could do that in the backend as well. For me, the
main reason for a meta-backend is that it gives the user the choice of
where the defect removal code is run. When a handheld is scanning from
a high-spec server, it's best to run it on the server, wheres if a
3GHz P4 scans from a diskless 1988 SPARCStation 1+ with 16MB RAM, then
that's not a good idea.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] I'm getting there...

2003-12-21 Thread Major A
 I'd like to thank you guys for taking your precious time to help me.
 I, once again, need some assistance.

  gcc hubba.c
 hubba.c: In function `main':
 hubba.c:27: warning: passing arg 1 of `sanei_usb_close' makes integer from 
 pointer without a cast
 /tmp/ccWqpZ3d.o(.text+0x11): In function `main':
 : undefined reference to `sanei_usb_init'
 /tmp/ccWqpZ3d.o(.text+0x21): In function `main':
 : undefined reference to `sanei_usb_open'
 /tmp/ccWqpZ3d.o(.text+0x46): In function `main':
 : undefined reference to `sanei_usb_close'
 collect2: ld returned 1 exit status
 --

Syntax error: you have to pass two parameters to gcc, a -L telling
it a directory to look in for libraries, and -l to specify the
library (in this case, -lsane, I think). -L is typically before
the C file in the command line, while the -l options are usually
last.

 Some have suggested just to use fd in both of the functions
 (sanei_usb_open and sanei_usb_close).  That is what I am going to

Who suggested that? This is decidedly wrong. C is a very logical
language but also quite picky about what you feed it with. If the same
argument works in both functions, then that borders on a miracle.

As Henning suggested, you have a C problem, nothing really particular
to SANE.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] In search of a master

2003-12-19 Thread Major A
 Does anyone know which standard header file to include for size_t?
 Shouldn't that be included in sanei_usb.h evene if a backend includes
 it anyway?

I think stdlib.h is sufficient (it defines malloc(size_t)). That's all
I can find quickly in the glibc docs, don't have KR at hand at the
moment.

Even so, I think a better header scheme is called for. Since the
sanei_* headers are parts of the libraries that backends build upon, I
think it would be better to make a single sane.h that include
everything that is needed. The libraries can still include the headers
separately, but backends only have to use a single include to get
everything right.

Please comment.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] In search of a master

2003-12-19 Thread Major A
 sanei_backend.h is used for stuff like this.

You're right, sane.h should only contain SANE API stuff.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] RE: In Search of a Master

2003-12-19 Thread Major A
 /*Declare any prototypes */
 SANE_Int fd;
 SANE_Status sanei_usb_open (SANE_String_Const devname, SANE_Int *dn);
 void sanei_usb_close (SANE_Int dn);
 void sanei_usb_init (void);

I'm telling you for the third time: these prototypes have no place in
your C file, they are defined in headers which are to be included.

 /* Try to close the USB device */
 sanei_usb_close(fd);

No. sanei_usb_close() takes a SANE_Int, not a SANE_Int*. In English,
get rid of that .

 hubba.c: In function `main':
 hubba.c:19: warning: passing arg 1 of `sanei_usb_close' makes integer from 
 pointer without a cast
 /tmp/ccwP9p1i.o(.text+0x1e): In function `main':
 : undefined reference to `sanei_usb_open'
 /tmp/ccwP9p1i.o(.text+0x2e): In function `main':
 : undefined reference to `sanei_usb_close'
 collect2: ld returned 1 exit status

You must link against the relevant libraries, with -l parameters. By
far the easiest way of doing it right is to copy your file into the
backend directory with sane-backends and to modify Makefile.in in the
directory to include your backend in the build. I don't even know off
the top of my head which libraries to link against.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] sanei_usb.h header with errors

2003-12-16 Thread Major A
 I've been trying to compile a simple little app. for a while, but
 whenever I try to include the sanei_usb.h header, it returns an
 error about certain parsing errors before size_t declarations.  Has
 anyone else seen this?

Such reports aren't much use without a verbatim copy of the actual
error message.

Anyway, parsing errors mean literally just that: the compiler found
something it can't make sense of. In your case, it's probably an
unknown type (i.e. a missing typedef).

Remedy (guess off the top of my head): include sane/sane.h and
sane/sanei.h before sane/sanei_usb.h, in that order.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] On certain functions

2003-12-14 Thread Major A
Sorry, correction to my last email:

  SANE_Int fd;

rather than int fd;.

  Andras



[sane-devel] On certain functions

2003-12-14 Thread Major A
 Sorry if this sounds weird, but what kind of device number exactly
 goes in the parameter for the function, sanei_usb_open()?  Can I
 write:

You don't give a number, you give a pointer to a SANE_Int, as
sane/sanei_usb.h tells you:

  extern SANE_Status sanei_usb_open (SANE_String_Const devname, SANE_Int * dn);

 int Dev_num = 48;
 sanei_usb_open(/Path/to/device, Dev_Num);

Rather like this:

  int fd;
  sanei_usb_open(/Path/to/device, fd);

After that fd will be the device handle of your opened USB device.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] On using the files

2003-12-11 Thread Major A
 Since SANE uses libusb, I've been using those functions, in part the
 usb_open() function.  I've used the for loop to go through the
 various devices in the usb_devices structure of libusb to try and
 open it.  Can anyone help me with this little problem?

SANE uses libusb through sanei_usb, which is what I suggest you try
and use. If it's versatile enough for your needs (I guess it is), then
you gain a whole lot of portability by using it instead of libusb.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] Sugg: frontend to scan and append to pdf

2003-12-11 Thread Major A
 (I think this can almost be done with a script, but I
 am not sure about the append to pdf part...)

I'm quite sure it can. That script would create a new temporary
directory, then scan all images into it with the specified options
(resolution, format: jpeg or png, etc.). At the end of it, it simply
creates a TeX file that includes all of the pictures on a page each,
then compiles that file into a PDF using pdftex. If I had an hour
right now, and a flatbed on my desk, I would code the whole thing in
sh for you, but I'm afraid I'll have to do it next year.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] new Coolscan models

2003-12-03 Thread Major A
Hi,

I've just been made aware of the new line of Nikon film scanners. The
entry-level LS-50 has 4000dpi now, which makes me guess that the LS-50
and LS-5000 only differ in firmware, as was allegedly the case with
LS-30 and LS-2000...

Anyway, if someone has access to any of these scanners and would like
to help me add support to the coolscan2 backend, please let me know.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] Digital ICE support

2003-12-01 Thread Major A
  This IR data is the raw data which contains quite a lot of red
  information as well, for most films. You need to extract the pure IR
  information, and that's probably best done by adding the cubic roots
  of the four channels with appropriate weighting factors and then raise
  the result to the power of 3.
 
 Like in (sorry, I can cope better with formulae than text ;-):
 
 i' = (A*r^1/3 + B*g^1/3 + C*b^1/3 + D*i^1/3) ^ 3

Exactly.

 where A + B + C + D = 1? Is the order of the roots/power arbitrary or
 just another secret I don't know about color theory?

The sum can be anything. The order is important of course, the number
3 is probably empirical, i.e. determined by experiment. It's the power
used in the IBM patent, and I've found it to be a good choice.

  I don't think that would be very practical if IR processing is done
  during scanning. This could be useful while writing and debugging the
  code, though.
 
 I disagree. I think that in most cases a fully automatic defect removal
 algorithm is fine for the user, but there will always be borderline
 cases/images where the algorithm will crash against the nearest wall and
 where algorithm-aided manual removal will still be better than unaided
 removal. 

You can either do IR cleaning during scanning, in which case the user
can maybe set a few parameters and then gets a cleaned RGB image. This
approach would be possible with SANE1, provided the backend cleans the
image. Or you can scan the RGBI image, and then the frontend (or an
external application) does the cleaning. In this case, you can of
course give a lot of feedback to the user, but since cleaning is done
after the information has gone through the SANE API, there's no need
to extend the API at all.

I think if a user has the image cleaned during scanning, they accept
that the result can be sub-optimal, and the last thing they want to do
is to scan the same frame over and over again with the same
exposure/focus settings when the only thing that changes is the
post-processing of the data. If the user wants more control, they have
to scan first, then post-process separately.

 From my (small) experience, it's only harder with Kodachrome, the other
 slides I had (mostly Agfa consumer material) had almost perfect IR
 channels with no resemblance to the original picture, only speckles and
 scratches.

That's right. It's possible with Kodachrome, but a lot harder because
the IR channel isn't as well-separated from the rest of the channels.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] Digital ICE support

2003-12-01 Thread Major A
 The problem with Kodachrome is the same as it is with BW negative film.
 The sensitive emulsion contains a large amount of silver and this
 materiel does produce something when scanning with IR, unlike it is done
 with conventionnal C41 or E6 emulsions.

Hmmm. Kodachrome emulsions don't contain any silver after processing,
but the die is different from that used in modern films, and their
absorption extends further into the near-IR range.

 Nikon has apparently solved the problem with the latest Coolscans, but
 one has to investigate how.

That's good news. I'm quite sure it's a software-only solution,
i.e. one can apply it to the older Coolscans as well.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] Digital ICE support

2003-12-01 Thread Major A
 I think that IR cleaning is a front end task personally. For starters
 you can tweek the IR cleaning parameters after the image has been
 scanned if you are not happy with the default ones, without having
 to scan the image again.

Agreed. I think there should be a sanei_* library that allows the code
to be used in frontends or meta-backends, whichever solution is
best. (Just think of a network scanner that is accessed by a handheld
device -- you don't want the IR cleaning to be done on the handheld.)

 Which is why IR cleaning should be a front end operation, with a set of
 default parameters for the most common scenario. I note that Vuescan
 only provides light, medium and heavy options in the front end for
 this. Clearly there is not a lot of need to twiddle parameters.

Nikonscan 2.x has no options at all, I think. I'm not sure about later
versions.

 I suspect that you are reading to much into what your particular scanner
 is doing. Infra-Red is a broad term describing a wide range of wavelengths.
 It starts just above the visible at 730nm or so and extends well
 over a 1000nm. I imagine what you see on a particular film depends
 heavily on the wavelength used which is likely to vary between scanners.

True. On the other hand, there isn't much room between the visible
range (down to about 730nm as you say) and the longest wavelength that
can be picked up by a CCD, so I think there isn't much variation
between scanners there.

 This might complicate doing IR in the frontend somewhat. However I suspect
 as long as the backend can communicate some parameters to the front end,
 then this can be taken care of.

We'll see, maybe an intelligent algorithm is good enough to find its
optimal parameters itself.

 I also note that IR cleaning is going to become a less specialised
 interest. Canon for one have started adding this to their flatbed
 scanners. As it cannot cost very much, one imagines that it will
 spread down the ranges to the cheaper models. Let's face it scanners
 are extremely cheap these days, and it is a way of differentiating
 your product in the market place.

That's an interesting development, and certainly worth looking into.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] Multiscan feature for coolscan2 backend

2003-12-01 Thread Major A
 has anyone attempted to use the Multiscan feature of certain Nikon film
 scanners? Being the naive fellow I am, this should work by setting a
 flag on the scanner and either it would do everything in hardware or it
 would send the several scans in raw to the driver.

Not yet. I'll do it early next year, when I have some time for this
kind of thing. I'll need help from other people though, because I
haven't got a scanner of my own that supports it.

Please keep asking or I might forget.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] Digital ICE support

2003-12-01 Thread Major A
 The alternative might be to try UV cleaning, though I suspect that the
 idea of illuminating precious negatives with UV might not be welcome.

I guess that's related to the fact that the UV light would be absorbed
by the emulsion -- which means UV cleaning would probably not work
very well.

 See the URL below for more information. Personally I would just have
 adjusted the relative position of the IR CCD line to account for it's
 moved position due to chromatic aberration.
 
http://www.canon.com/technology/detail/flatbedscanner/fare/index.html
 
 In fact the more I think about that idea the more I like it. Why stop at
 the IR line, have the positioning for all four lines set so that you can

Goodness me. This thing scans with white light, but has an optical
path adjustment glass which gets move in and out of the light
path. That means your IR channel gets scanned separately, so you have
registration problems anyway. I doubt the chromatic aberration makes
that much of a difference in this case.

After all it's only a transparency scanning solution, I thought Canon
had added an IR channel to their flatbeds in reflective mode...

 use cheaper optics and not have to worry about the chromatic aberration.
 Well you are worrying about it, but rather than spending money on
 reducing it, you just use it to your advantage, as the RGBI elements
 of the CCD in a line scanner cannot all be in the same position in
 the first place. That is assuming you are not using Foveon(tm) style CCD
 sensors of course.

Good idea, it would require very narrow sensitivity bands for the RGB
channels, though. Which means you would probably need a LED light
source, like the ones in the Coolscan scanners.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] Digital ICE support

2003-11-30 Thread Major A
  You've missed the first point: the IR information must be extracted
  first. Since the IR channel is a non-linear combination of the defect
  map with the R, G, B channels, this might get rather tricky. IBM has a
  patent on this as well.
 
 Hmm, can you elaborate? Can't the backend simply do the second scan
 when reading the IR channel is enabled and operate with that? Well,
 that's what I can do manually so I can imagine it'd be hard, but not
 unsolvable.

The coolscan2 backend currently provides the IR data in a second scan,
but this is only a kludge for the moment, it will go away with SANE2
(which will support RGBI).

This IR data is the raw data which contains quite a lot of red
information as well, for most films. You need to extract the pure IR
information, and that's probably best done by adding the cubic roots
of the four channels with appropriate weighting factors and then raise
the result to the power of 3.

 - Group adjacent defect pixels into defect clusters
  
  What for?
 
 - Being able to treat one defect at a time.

Probably a good idea, I need to think about this one.

 - Giving feedback to the user about the recognized defects, possibly
 with means to influence the correction process.

I don't think that would be very practical if IR processing is done
during scanning. This could be useful while writing and debugging the
code, though.

  I would just add all adjacent pixels, no threshold necessary.
 
 Um, the defect cluster should contain defect pixels only -- we don't
 want to repair pixels that are already ok.

In my experience, you have to mark all adjacent pixels as
defective. If, for example, you have dust on a patch of sky, you could
easily end up having a visible ring around the place where the dust
was, simply because the surrounding pixels didn't quite reach the
second threshold.

  Also, you have to treat any parts of the image that are obscured by,
  say, the slide mount, separately. Otherwise they will also fall in the
  category of dirty pixels, and interpolating a large area for nothing
  is probably the last thing you want to spend your CPU time on.
 
 Agreed. Recognizing the framing etc. should be fairly easy though from
 what I've seen -- it's really black and always at the edge of the
 scan.

Careful: it doesn't always surround the scan, you can adjust your scan
window so that the border between two frames falls within the scan
window. Also, some cameras print a date/time/whatever on the space
between frames, which would also mess up the assumption that the black
area is rectangular.

I think it's probably better to use a clustering approach and just
omit clusters that get too big.

  I'd love to have defect removal functionality in SANE, so please let
  me know if you have any good ideas and maybe we can one day make
  something that rivals ICE.
 
 You mean e.g. not giving up on Kodak slides? I have many of this type,
 so I'll love to have it as well.

I assume you mean Kodachrome? I think it's possible to do IR cleaning
on Kodachrome, but it's a lot harder than for E6 and C41 because the
IR channel is more strongly correlated with other colours than in the
case of E6/C41.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] [SANE2 proposal] Error handling

2003-11-29 Thread Major A
  Also, the entire thing must be network-transparent -- any such
  dramatic change to the standard would require a change in the network
  protocol as well, and a char* just complicates things.
 
 If we're to change the standard, we can change the network protocol
 too, and even more if we want a complete, secure rewrite of saned...

It has nothing to do with the protocol itself whether or not saned is
secure. If it isn't, why not rewrite it right away?

 Maybe, but at least it's still a simple, basic data type, and given
 the way SANE status codes are defined, 16 bits are more than enough
 for now.

This sounds like Bill Gates to me.

 That's another way, but it looks like a kludge to me as options aren't
 designed to report errors :)

They are designed to do a lot of things, and clarifying (not
reporting) errors would just be one more.

I don't understand why things have to be overcomplicated when there's
such a simple solution.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] [SANE2 proposal] Error handling

2003-11-28 Thread Major A
 Here's a proposal for SANE2 regarding error handling. As of now, error
 handling is somewhat imprecise and often not meaningful, and we're
 spending everyone's time debugging problems that could be solved
 quickly if only the user was given the appropriate status/error
 message.

Good idea... but:

 typedef struct {
   int code;
   char *msg;
 } SANE_Status;

OK, but that char* needs to be allocated and freed, which is always a
complication.

Also, the entire thing must be network-transparent -- any such
dramatic change to the standard would require a change in the network
protocol as well, and a char* just complicates things.

 Slightly redefine SANE_Status, as a 32bit integer where the 2 MSB are
 a backend-specific error code and the 2 LSB are a standard SANE status
 code.
 
 The 2 LSB will always correspond to a SANE status.

Packing information into integers like this is ugly, I'm sure there's
a better way of doing things.

Here's another proposal: introduce a new standard option called
something like last-status. This is a read-only string option, not
displayed among the normal options, that can be read out at any time,
and the returned string is simply the verbose form of the status of
the last function call to the backend. If that option is not defined,
the backend simply reverts to the SANE_Status way of reporting errors.

This doesn't require SANE2, BTW, it could be added any moment, even to
SANE1, and would be completely network-transparent.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] Fwd: Nikon Coolscan II LS20

2003-10-29 Thread Major A
 A question from my side:
 
 Is it correct that coolscan  and not coolscan2 has to be used with the LS20?

That's correct. Coolscan2 only supports LS-30/LS-2000 and later.

Unfortunately, the coolscan backend seems to be abandoned -- we
haven't heard much from the author recently, and there have been
pretty much no changes to it at all for about two years.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] Nikon Coolscan

2003-10-23 Thread Major A
  Now I want to use an Nikon Coolscan II (backend driver 'coolscan').
 
 Use coolscan2 backend. It works with most CoolScan scanners and is much
 more up to date.
 Works great with my CoolScan III.

Coolscan2 only supports LS-30/LS-2000 and later. Coolscan II is of the
older type and has a somewhat less systematic interface, from what I
can tell. It would be possible to add support I guess, but a lot of
work.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] What's a good slide scanner to use with Linux and SANE?

2003-09-25 Thread Major A
 and by good I don't mean expensive professional quality, but
 good enough for home use.

The entire line of Nikon Coolscans is supported, to varying
extents. The only real troublemaker is the LS-8000, owing to the large
variety of film inserts. Also, multi-pass scanning isn't supported
yet.

Some of these pop up on ebay every now and then.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===



[sane-devel] film scanner

2003-08-28 Thread Major A
 I read a lot about Problems with film scanners and linux/sane. So I want to 

The problems are mostly related to the front-ends, as there is no
really convenient way of removing the orange mask (for negatives) and
IR-based dust removal.

 ask for a supported film scanner with about 1600 or more dpi. Who has any 
 experienc, wich scanner is supported well?

I use an LS-30, all hardware functions are supported. I have also had
positive confirmation from users of LS-40, LS-4000, and LS-8000,
though the latter is a bit problematic because of the large variety of
film holders.

 I had a look in the db, but I don't know, wich are film scanners and wich 
 not. It seems, that the most known film scanners are not or not well 
 supported (minolta, nikon ...)

Most Nikons are certainly supported, and so are a few Canons I'm told.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Re: Coolscan 2 and autofocus

2003-08-13 Thread Major A
[I'm also replying to the SANE mailing list, please send questions
like this to that list in the first place.]

 I have a Nikon LS-2000 (Super Coolscan 2000) that I'm trying to get
 working with SANE.  It will not autofocus properly.  The driver sends
 the focus command and the scanner makes focusing noises for a while, but
 then the driver gets back 0.  Looking at the actual data returned from
 the scanner in s-recv_buf, it is 13 nulls.  Any idea what the problem
 is?

That's weird. I've had reports from at least one LS-2000 user who says
the scanner works fine, including AF, so this is interesting.

AF is performed in three steps in coolscan2 -- the first two cause the
scanner to autofocus, the third reads the focus position back. I guess
you're talking about the third command when you refer to recv_buf.

Thus it seems that your scanner performs AF properly, but then fails
to send the resulting focus position back to the computer, if I
understand what you're saying. Have you tried scanning with manual
focus to see whether that works?

Finally, what SCSI controller do you use?

 Also, do you have documentation on the scanner?  I would like to help
 out with driver development and fixing bugs like this but lack any
 documentation apart from the user manual.

I have, but it's under an NDA, so I can't distribute it.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] SANE2 plans: RFC

2003-08-10 Thread Major A
 Just a thought. Could SANE2 introduce a handcheck protocol to determine which 
 API is used :
 frontend_knows_versions( list_of_versions )
 backend_agrees_to_use( version )
 frontend_confirms_use_version( version )
 
 If those functions are not found in backend - SANE1

How do you expect that to work? Maybe it's OK when you use dynamic
loading, but it will break static building for sure.

 That would avoid a CVS mess up.

It wouldn't do now for the reason just mentioned, but I think your
idea is worth considering for SANE2 so that the transition to SANE3
will be smoother...

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] SANE2 plans: RFC

2003-08-10 Thread Major A
 Please don`t mix versions in the backend.
 There is no reel advantage to create a backend that supports version1 and 
 version2.
 But it makes the backends very complex, large and has a high risk for bugs.

I totally agree. Universal frontends are a must (or at least a dll1
meta-backend for dynamically linking SANE1 backends to SANE2), but
backends should be version-specific. Let's not try to do things the
Microsoft way. BTW, SANE2 explicitly states that only one version
should be supported by any one backend, let's keep it that way.

I also agree that splitting the source trees would be the best way to
go. How about a sane-backends2 or so? We don't even have to distribute
SANE1 backends with the (future) standard distribution for a start,
they could remain part of the existing sane-backends and be accessed
by dll1 or so. (I don't think static building will be a problem here,
those who don't use dynamic loading are either running on a stone-age
system or using embedded hardware, and neither of these species are
going to update SANE very often.)

Having said that, I have a few comments about the SANE2 standard, but
more about that later this week (I hope I have some time then).

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] [long] Want someone help me about Canon FS4000US USB/SCSI driver ?

2003-08-09 Thread Major A
 Summary : this scanner don't work yet under Linux (can I now say that?).
 USB bus don't give enough informations, so the scsi bus must be used.
 IMHO, there's a problem with the scsi bus. Perhaps is it my fault, I 
 don't know (but all other SCSI hardware I have are working perfectly 
 under Linux).

Both the USB bus and the SCSI bus can give you an aweful lot of
information. You can enable debugging options to the extent that every
byte passing the bus is detected. It does help, though, if the scanner
is the only device with that bus on the computer because otherwise you
might have to filter the scanner's data out of a huge stream of
messages. The only time this is not a problem is when you only obtain
log messages from the USB scanner module, because those logs will only
come from the communication with the scanner.

 I didn't understand all what you say because I don't know what does even 
 mean sane2 standard (sorry), but I'll read some documentation about 
 this, and I'll soon be able to give you a correct answer ;-)

The SANE standard describes the interface between frontend and
backend. Currently it isn't flexible enough to support such things as
colour management, therefore such extensions should be added at some
stage to make film scanning (and high-fidelity colour scanning in
general) much easier.

For the time being, don't worry about the frontend, the protocol is
everything, actually coding a backend when you have it is relatively
simple.

 Thank you very much for all this software I didn't even know before. 
 I've downloaded them all. I'll do the tests under Windows and Mac OS (X 
 with Classic) and come back (soon ?) with what I have found. Thanks a lot.

You can also log directly under Linux -- provided VueScan works
(preferably with both interfaces). VueScan uses the sg and scanner
modules to access SCSI and USB scanners, and kernel logging can be
used to dump the data.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] SANE2 plans: RFC

2003-08-09 Thread Major A
Hi,

I think that we should get the SANE2 implementation rolling, even if
the standard isn't completely finalized. A standard is never final
without even a single frontend and backend to use it.

As Henning has said, adapting the test backend and scanimage should be
first. But how shall we do that in CVS? The frontend should be easy
enough because it can check for the backend version to see whether
SANE1 or SANE2 is used, making it completely transparent to the
user. But there is no version-check facility for frontends, so
backends will be a bit more difficult. Shall we create a new directory
backend2 for all the SANE2 backends? Or a new repository altogether? I
don't like CVS branching because it causes too much confusion for what
you gain from it.

What do you think?

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] [long] Want someone help me about Canon FS4000US USB/SCSI driver ?

2003-08-07 Thread Major A
Eric,

 2) It's not known in sane-kackend

Watch out with those typos, there are too many German speakers on this
list... :-)

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] [long] Want someone help me about Canon FS4000US USB/SCSI driver ?

2003-08-07 Thread Major A
 Note to be really useful you are going to need to write a front end as
 well, and sort out the proposed Sane2 standard so that you can get
 the IR channel back from the scanner to the front end. Though you
 are probably best served by getting it working with Sane1 first.

Jonathan, you never fail to discourage people trying to use SANE. A
film scanning frontend doesn't have to be FS4000-specific, so there
are plenty of other programmers who are interested in film scanning
and could help with the frontend, and also with the SANE2 standard.

BTW, what does the new frontend have to do with the IR channel? A
frontend should never get IR data in the first place.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] [long] Want someone help me about Canon FS4000US USB/SCSI driver ?

2003-08-07 Thread Major A
 Note to be really useful you are going to need to write a front end as

Are you suggesting that Coolscan2 and various other backends
supporting film scanners are currently totally useless?

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Scanning negatives with Epson Perferction 1260 Photo

2003-08-02 Thread Major A
Jonathan,

 The only way to get good negatives scans under Linux that I know is
 to use VueScan. This is however shareware. You also need a proper
 negative scanner but that is a separate matter.

This is a SANE email list. People do not usually come here to ask
questions about other pieces of software, and certainly not to be
recommended a piece of _commercial_ software. Your statement that good
negative scans can only be produced with VueScan under Linux is simply
false, as I have proven to myself (using the Nikon LS-30). The way of
getting there might be different, but the result is the same
(actually, with the Coolscan2 backend, it's usually better).

In any case, we are here to develop a cross-platform scanning package
that is at least as good as anything else out there. If you fell that
SANE is really that far behind VueScan, please feel free to help by
creating a negative-oriented frontend. But please don't in any case
direct users to a piece of commercial software that has nothing to do
with SANE.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Scanning negatives with Epson Perferction 1260 Photo

2003-08-02 Thread Major A
Jonathan,

 I did sit down and make a long list of things that I thought where missing
 from the SANE API for negative scanning and posted it to this list. I am

If you have your original email handy, would you mind posting it to
the list? Then we would have a good starting point.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] SANE2 (was Re: Scanning negatives with Epson Perferction 1260 Photo)

2003-08-02 Thread Major A
 It seems to me that if nothing happens on the SANE2 front (eg development), 
 SANE2 will stay a mirage. A well documented illusion.
 A lot of people have given some input, but if the proposal isn't 
 implemented, why care?

Good point, Frank. The bad thing is that SANE1 and SANE2 are mostly
incompatible, so it's currently quite difficult to write a SANE2
frontend because there no suitable backends, and vice versa.

It just occurred to me that we could make a shortcut: create a
metabackend that converts from SANE1 to SANE2, and one for the other
way round. All that would be needed is an appropriate directory
structure in CVS, and we could have SANE1 and SANE2 running
concurrently.

I might have some time in a couple of weeks, so maybe I'll have a
closer look at SANE2 to find out how the conversion can be done.

This is an RFC.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Sane API Suggestion

2003-07-21 Thread Major A
 I don't think that network transparency introduces a problem for user 
 data pointer sizes. Since Sane itself does not deal with this pointer, 
 the net backend does not need to send and receive the correct value of 
 this pointer to/from the Sane server. Instead, the net backend can use 
 the pointer value as passed by the application in the callback.

OK, you're right.

Back to the original question: I just realized that the callback
function is set when you call sane_init(), thus it must be the same
for all scanner instances. Therefore I can see little point in having
any kind of user_data since even a Scheme interface to SANE would only
use sane_init() once so it could store the user_data itself just the
same. (Unless, of course, the Scheme interface would allow for more
than one backend to be used at the same time, but with dynamic loading
etc. this would soon become a mess anyway.)

 Well, some time has passed sine my last look into the Sane 2 API docs, 
 but IIRC it has at least one more callback.

I can't remember any. The only thing that is similar in a way is the
file descriptor returned by sane_get_select_fd(), but it's not a
callback.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Third revision of Scanner HOWTO available

2003-07-20 Thread Major A
Howard,

 Thanks for any input,

Sorry for joining the discussion so late, and sorry for possibly
duplicating what others have said (I didn't have time to read their
responses).


chapter 2.:

There is no mention of IEEE 1394 devices. There should be, since
several of those are supported by SANE, and setup might not be
trivial. (See problems with LS-8000 with certain kernel versions.)

(Oh, I've just spotted Firewire in there -- please refer to it as
IEEE 1394, because that's the standard name, Firewire and i.Link are
proprietary names for the same thing by Apple and Sony.)

Most USB devices are supported ... with the SANE application
programming interface. This is very confusing, I think you should
split that into two sentences. One thing is that they are supported by
SANE, the other is that SANE uses a homogeneous API throughout,
regardless of the hardware.


chapter 3.:

IMPORTANT: You cannot have both kernel scanner support enabled (i.e.,
compiled in statically or the module loaded if a module) and libusb
installed and access the hardware at the same time, or nothing will
work. Why not? The only thing that won't work is sane-backends with a
USB scanner if it was built with libusb support. nothing will work
is a bit of an exaggeration. Also, libusb can safely be installed when
the kernel USB scanner module is loaded, even SANE will work as long
as sane-backend was built without libusb support.

I'd write Directio as DirectIO in the title, or even Direct I/O,
to avoid confusion (directio can be mistaken as a typo, or a latin
word!).


chapter 4.:

There is no mention of libusb here -- you don't need any device files
outside /proc/bus/usb/ if you use libusb. Somewhere on the line, you
should also include instructions on how to use hotplug to modify
permissions to devices in /proc/bus/usb/ so that a regular user can
access the scanner.

WARNING: If you enable 'devfs' without devfsd you will be left with
an unbootable system! -- not true: this only applies if
CONFIG_DEVFS_MOUNT is also set.


chapter 5.:

saned section: there's no mention at all of the changes required to
net.conf. Also, what's the warning all about? I'd say it's advisable
to run saned as a dedicated user (I usually call it saned), but it's
not a group. Also, once saned is set up properly, _everyone_ has
access to the scanner without requiring root privileges, as long as
their computer is listed in saned.conf.

chapter 6.:

It would be very important to note here that sane-find-scanner isn't
related to any backends, therefore cannot tell whether the scanner is
supported or not. It only looks for devices which claim to be
scanners. BTW, it also works for IEEE 1394 devices (which essentially
behave as SCSI once SBP2 is set up).


chapter 7.:

X-windows is misleading and even wrong. Please use X11 or The X
Window System. X-windows sounds like a sci-fi version of M$
Windows.

gtk+-1.2: version unnecessary, write GTK+ (in capitals please)

It would be nice to elaborate on the GIMP-xsane relationship,
i.e. that xsane can be used as a GIMP plugin, and maybe even how. Most
people I know only ever scan with the GIMP plugin because they're used
to TWAIN scanners under Windows that only support scanning from within
an application.

A more spartan solution (though technically a meta-backend) is
xscanimage, which is bundled with SANE: 1. it's not really spartan,
given the gamma adjustment capabilities which surpass those of xsane,
2. it's NOT a meta-backend but a frontend, 3. it's bundled with
sane-frontends, SANE is too general.


This was just a quick run through the document, hope it all makes
sense. I like the overall structure of the document.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Sane API Suggestion

2003-07-20 Thread Major A
  A thin C interface layer could then use one callback dispatcher to
  handle all C callbacks.  The callback dispatcher could use stdarg.h
  to process the other args or perhaps they could be passed to the
  callback using a count and array.
 
 Well, maybe the other developers have more experience with other
 languages. My first impression however, is that this makes the
 interface more complicated and complex. However, I'm no expert in
 interface design so if the other developers say it's better that way,
 I'll accept that.

Scheme is a full-blown functional language, and thus very different
from a pure procedural language. You can see from GObject (loosely
part of GTK+) how difficult it is to approach object-oriented
programming with C, and emulating functional programming in C would
certainly be totally impractical.

No C API will ever approach the full closure capabilities of Scheme,
so some sacrifices on the Scheme side must always be made when
interfacing C code.

  In the future, I would be happy to contribute a scheme-sane interface 
  library to the sane project, but it sure would be nice if the sane api was 
  more non-C friendly.
 
 Well, it's a C interface so beeing C-friendly is a feature :-)

The SANE API is designed to be simple and portable, and any change
towards object orientation or functional programming would only bloat
it unnecessarily. Sorry, if you want to interface Scheme to SANE,
you'll have to adapt to the way things are.

Adding a callback data argument to both sane_init() and
SANE_Authorization_Callback would cause a number of problems, in
particular that of network transparency. Scheme or C++ programmers
would certainly like to use that parameter as a pointer to a
structure, but that only works if the size of the argument is at least
that of void*. Since the latter varies across platforms, this would be
ugly and non-portable.

Since the only callback in SANE is the one responsible for
authentication, I'd say it wouldn't be worth changing anything. A
Scheme frontend would either have to relay the authentication request
to the user, in which case the callback data is not used, or look up
username and password in a database, in which case the resource string
supplied is sufficient.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Re: Nikon Coolscan IV and scanner.c funky result -75

2003-06-17 Thread Major A
Dmitri,

Hope you don't mind me also sending a copy to the SANE list.

 often I get this strange error : scanner.c blah funky result:-75
 blah. I have been getting this for a while and once it happens,

OK, that sounds familiar, but I still don't know a solution to it. The
tricky bit about USB is that if there's a bug in one of the generic
drivers, it might go unnoticed for very long because most hardware
doesn't trigger it. I'm pretty sure this has to do with the USB system
in Linux, and I think it has been reported to the USB team. A
user-level program like SANE should not be allowed to crash the
computer like that, so it's certainly not exclusively a SANE problem.

 the only solution is to reboot - the scanner module cannot be
 unloaded, it says it is always in use.

The scanner module is more and more obsolete. Most backends in newer
SANE releases (from 1.0.11 I think) use libusb, which on Linux uses
usbdevfs to access the hardware. This should be much more
robust. Could you please try the latest SANE release and make sure
libusb (including development files) is installed when you build it?

 scanner: HP5300C and that works just great with hpusb driver. Also,
 I have a Nikon (speaking of the brand loyalty :) D100 digital camera
 and just managed to get it connected (USB) to linux using gphoto2
 and hotplug. They both work great - so it seems that I got the USB
 system right.

Unfortunately, as I said above, this is not a guarantee that the USB
system works all right. I've been using the VIA USB 2.0 controller on
my mainboard for months now without any trouble, but the moment I
connected an external USB 2.0 hard disk to it, things started going
very wrong. The solution is still outstanding, the USB team are
working on it...

 VueScan. Great program, I just wish to have bought it when it was
 only $40 for lifetime updates, now it is $80 for a year :(

Seems that SANE is finally taking away some of Ed's income...

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Re: Nikon Coolscan IV and scanner.c funky result -75

2003-06-17 Thread Major A
 I'll try to summarize the problem (copied from a mail to
 linux-usb-users):
 
 | We want to read 42448 bytes (e.g. two scan lines). The buffer size is
 | 32768 so that's the maximum we can do in one turn. The scanner returns
 | only 21224 bytes (probably one scan line). So far that's ok.
 | 
 | The reason is that the next read reads only 9680 bytes instead of
 | 21224. The scanner doesn't seem to be able to handle this.
 
 So the scanner doesn't seem to like reads different from the size of
 one scan line (?). I gueess the backend shouldn't try to read more
 than the scanner is able to return.

Ah, OK, but Coolscan2 strictly tries to read one scanline at the
time. On the LS-40, this is a maximum of 23328 bytes (2916 pixels, 4
channels each, 2 bytes per channel), which is less than 32k.

 They are able to use libusb. If the scanner driver is loaded, it will
 be used.

OK, in that case please make sure the scanner module isn't loaded.

 The Nikon Coolscan 4 seems to be the only scanner with this problem.
 At least that's the only one I ever got reports for. So I really think
 it's either a scanner or backend problem.

Hmmm, that would be me... the scanner is a bit silly in the way that
it tunnels SCSI commands across USB in a proprietary way, but it seems
to work great in most cases, so it's probably not a hardware fault.

  Unfortunately, as I said above, this is not a guarantee that the USB
  system works all right. I've been using the VIA USB 2.0 controller on
  my mainboard for months now without any trouble, but the moment I
  connected an external USB 2.0 hard disk to it, things started going
  very wrong. The solution is still outstanding, the USB team are
  working on it...
 
 I've heard similar reports and they seem to be fixed with 2.4.21. But
 your milage may vary...

No, not mine -- in fact, 2.4.20 nearly works, 2.4.21 is totally
broken. With a different card, 2.4.21 works just fine...

 By the way: The problem with coolscan/kernel scanner driver seems to
 happen (have happened?) also with vuescan. Looks like a similar
 scanning routine is used.

That's right. VueScan also uses (used?) the scanner module, so go
figure...

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] translation question

2003-05-29 Thread Major A
Frank and Henning,

Thanks for the quick responses. I'll start by adding i18n support to
my coolscan2 backend whenever I have a spare minute.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Reflecta digitdia 3600 slide scanner

2003-05-23 Thread Major A
Thomas,

 today I couldn't resist and ordered such a reflecta scanner.
 Its main feature is the capability to scan slides in their native
 magazine. Meaning you dont have to take the slides out of the magazine
 in order to scan it.
 Batch scanning should be easily possible.
 External interfaces are USB2 and Firewire.

Good -- Firewire means that it probably uses a SCSI protocol over
SBP2.

 Trying google, I didnt find many hits with sane and reflecta.
 So I guess, this scanner will not be supported and I have to use
 the program that comes with the package under M$.

Try writing to Reflecta, asking for the programming specs to be
released. Refer to SANE as THE platform-independent scanning solution
that has a wide user base in the UNIX world, and that there are a
large number of users who would buy this scanner if it had support
under UNIX. I did this with Nikon and it worked. It also helps if you
mention that many popular brands have released their specs (at least
to individuals), EPSON and Nikon for instance. It is OK to sign an NDA
as long as it allows you to distribute code under the GPL (this is the
case with Nikon -- the specs are confidential, but the code can be
GPL-d).

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Dusting-off with the Gimp/Coolscan2

2003-05-20 Thread Major A
 It works quite nice, though still not perfect. You can get a complete 
 tar from my homepage (www.xs4all.nl/~ljm).

I'm afraid the tar link doesn't work for me: The requested URL
/~ljm/dirtyduster.tar was not found on this server.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Exif informations

2003-05-19 Thread Major A
 And I would like to have some informations, about  the date, the 
 parameters, the version, the author and all that I have
 
 The scanner cannot determine data about the author, when a photo was 
 taken, or which aperture and shutter speed was used as a 35mm camera 

It can, however, tell the frontend a list of settings that are
important, which are then to be saved into the output file by the
frontend. In the case of coolscan2, this could be exposure and focus
information, which would indeed be useful.

To sensibly do this, we need to amend the SANE standard, however, in
such a way that the backend can specify which options are to be saved.

I'm not familiar with EXIF, so would you mind if I asked what exactly
it is? Is it just information embedded into a JPG file, or can it be
used with other formats as well?

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Re: [dsa] Theoretische Physik - Frage

2003-05-18 Thread Major A
 Eine Sanduhr bestehe aus einem oberen und einem unteren Glaszylinder mit
 [...]
 Hinweis:
 Betrachten Sie zweckm??igerweise die Bewegung des Schwerpunktes der Sanduhr.

Die Loesung steht schon in der Aufgabe.

Uebrigens stimmt es nicht exakt, dass die Waage nicht ausschwenkt,
aber wenn Du dies nicht vernachlaessigen willst, dann wird's recht
komplex (Du musst betrachten, wie genau sich die Sandkoerner bewegen,
und da spielen Lawinen etc. eine rolle...).

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] net/saned problems with EPSON backend

2003-05-17 Thread Major A
 Any news about this? Can anyone reproduce the problems with other
 backends?

I haven't got much time to play around now, so I'd guess I'll have to
leave things until after 1.0.12.

Can anyone reproduce it with the EPSON backend? All you need is an
EPSON scanner (I use Perfection 1240), and run it via net/saned.

 Tomorrow is code freeze and if there is a wide-spread bug I'd like to
 fix it. On the other hand there haven't been changes to saned that may
 have changed such behaviour during the last few releases. So if there
 is a bug I guess has been sitting there for quite a long time.

The previous version I replaced with 1.0.11 and 1.0.12-pre1 was 1.0.4.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] net/saned problems with EPSON backend

2003-05-15 Thread Major A
  Is it possible that there is a problem in net/saned that only comes to
  light when there is a physical network involved, as opposed to a
  loopback interface?
 
 Yes, that's possible. We had such bugs in saned some years ago. I
 think it was the other way round (only localhost buggy), but that

I think I jumped the gun here. I can't reproduce the exact behaviour
that I had before, but there still are differences (they might be
random though, not dependant on what network interface is used).

I'm still using 1.0.11 (more about that later).

I have a suspicion, though: as it is at the moment, the options that
cause trouble are the ones which allow from a selection of strings AND
which use strings with whitespace in them. Currently (that might
change tomorrow if there really is something random to it) the only
option that can be set without an invalid argument is the Focus
2.5mm above glass, but only if xsane runs on the REMOTE
machine. Anything else (including the other choice in this option,
Focus on glass), results in an invalid argument.

It doesn't make a difference as to whether I run saned from inetd or
in debug mode. In debug mode, it doesn't print anything out of the
ordinary.

 Try to reproduce with different frontends (e.g. scanimage). Does it
 really only happen over the net and not with net:localhost:epson? Does
 it always happen? After you get the error, can you go on or does saned
 crash?

I also tried scanimage, with very interesting results. Run as root
(always making sure the right device was set with -d), scanimage works
just fine. As a regular user, however, it doesn't, it gives invalid
arguments. Here, behaviour seems to be the same across both machines.

saned never crashed after the error.

 You could also try sane-backends 1.0.12-pre1. There have been some
 changes to saned, but I don't think they are related to your problem.

I just tried 1.0.12-pre1 on my own scanner at home, no problems at
all. I modified the coolscan backend to include string names with
whitespace, still no error.

Now I've also tested 1.0.12-pre1 on the machines in question: xsane
still does the same weird things (but only through the net/saned, not
directly), but now both machines are identical in behaviour. Also,
scanimage seems to work just fine now. I haven't rebuilt xsane, I
don't think it would make a difference.

What do you think? What can I try next? Wherever the problem is, it's
somewhere between saned and the net and epson backends, with some
involvement of the frontend...

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] gamma table value

2003-05-14 Thread Major A
 to remove /dev/null before you can run configure
 again.'

(Aehhh, anyone know where this could come from? It's not supposed to
refer to /dev/null, is it?)

  The problem is: You just can't make a good, simple, clear
  documentation that supposes no previous knowledge. That would be a
  big book if it should tell details for every supported scanner.
 
 Then that's a major shortcoming of Linux!

No, it's not: as I said above, it's all there, it's just split up in a
hierarchy. Windows, MacOSX, etc. are all the same -- you start with
those Windows for dummies books and finally end up at something more
advanced that certainly requires some background knowledge to
read. (Except that with Windows, many of the more advanced documents
such as programming specifications are simply missing.)

  A short, simple instruction is: Install sane-backends, run scanimage
  -L. If it doesn't work, read man sane, man sane-backendname.
 
  But I did install sane-backends and ran scanimage -L and
 sane-find-scanner - with the results detailed below - which, you say: 'Looks
 fine',  So I had no reason to think that there is anything wrong with
 sane-backends - if there is(?).

Why did you remove it then? Both sane-frontends and xsane build on it,
sane-backends is totally independent of these frontends.

   but, when I try
   to launch scanner [as 'root'] by clicking desktop 'Scanner' icon, I get:
   'KDElnit could not launch xscanimage: Could not find xscanimage
   executable'.
 
  Neither sane-frontends nor sane-backends contains a desktop Scanner
 icon.
 
 On my SuSE desktop - both 'root' and 'user' versions, which are slightly
 different - there are a number of icons, such as Trash, /Windows/C,
 /Windows/D,
 OpenOffice, CD-R, CD-ROM, etc, etc, including one marked: 'Scanner'.
 This is the icon I clicked.

This is nothing to do with SANE. You may think otherwise, but the
command line is a very basic instrument, not only in GNU/Linux but
also in Windows (in fact, more than before with its modern
super-intelligent versions).

I can only guess (don't really know SuSE nor KDE or whatever desktop
you use) that the scanner button simply tries to run xscanimage,
which is equivalent to you typing xscanimage on the command line.

 As I stated in my original message, I have also downloaded/installed xsane
 as it seems to be generally recommended., but haven't yet tried to use it
 (none of the articles I have cited tells me how!)

Well, if you could build scanimage and run it, then you'll certainly
be able to do this one as well -- the basic procedure is exactly the
same.

Hope I didn't upset anyone, didn't mean to.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Questions on dust-removal and infrared support on Nikon

2003-04-15 Thread Major A
 After the remarks by Oliver and Andreas, I decided to try the
 stand-alone program for dust correction. Downloaded it, compiled
 it and tried to understand what it does.  It seems that the duster
 program requires a separate file containing the IR-chanel. I could
 
 not find this option in any frontend.
 
 How do you make such a file? 

Coolscan2 will generate one. See the sane-coolscan2 manual page for
details.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Questions on dust-removal and infrared support on Nikon

2003-04-11 Thread Major A
 Although the new coolscan backend supports the IR-channel, I cannot
 get this combination working again. So I have two questions:

Coolscan2 has a different way of transferring the IR image to the
frontend. Read the sane-coolscan manpage for more information. Note
that the R channel correction done by the coolscan backend is not
available in coolscan2 (because it doesn't make sense to do it in the
backend). I suggest you code that into the GIMP plugin.

 2)One of the things the coolscan2-backend is trying to do is
 to incorporate dust-removal in the backend. I cannot find the
 status of this. If needed, I can do some testing on the LS2000.

No, but there are plans for a meta-backend, but for the moment the
only dust-removal code is in duster.c in Coolscan2 CVS on
SourceForge. Please give it a try if you feel like hacking a bit.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Re: HP SJ5300C

2003-04-07 Thread Major A
 At least with Mustek BearPaw 2400TA, there is a difference between using
 scanner.c or libusb: libusb is slower.  Usually this does not matter -
 but at some resolutions scanning becomes unusably slow with libusb (lots
 of backtracking, even on Athlon XP 2000+), while the same settings with
 /dev/usb/scanner0 gives at most 2-3 backtrackings.  This is because the
 GT68xx chips have a very small buffer - only 16KB.
 
 Looking at the code, I see that scanner.c uses 32KB buffer size for
 read, but devio.c (which is used by libusb) uses one-page buffers (4KB
 on x86).

Given that USB 1.1 has a maximum payload of 64 bytes per bulk packet,
I don't see a problem with 16kB or even 4kB buffers. Are you sure this
is what causes the slowdown?

 At least with Linux this can be improved - even beyond the scanner.c
 capabilities.  usbdevfs has USBDEVFS_SUBMITURB, which allow asynchronous
 URB submitting, and even seems to allow queueing more than one URB for
 the same pipe.  (The Windows kernel driver for GT68xx seems to use this:
 the usbsnoop logs shows that it submits 5 URBs at once and then receives
 the scanned data using them as a buffer ring.)  However, this feature is
 not currently supported by libusb.

Good that you mention this -- I'm using libusb for another project
where throughput is really important. I'll have to look into the way
libusb chains URBs.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] What about creating music with scanning devices?

2003-03-30 Thread Major A
 The basic idea is to use a scanner as music instrument and translate a scan
 line into music notes (x-scale for differnt notes and intensity for the
 volume). Therefore it would be nice to have a constant y value (I don't see an
 interesting use for y!). So it would be great to read out that one y-line 
 and produce MIDI notes until Ctrl-C is pressed. 

Just to make sure I'm getting the right ideas: you want a scanner to
scan a single line over and over quickly so that you can synthesize
music by moving objects above the scanner's glass surface? Sounds very
interesting indeed!

 Is it possible to solve this (read out one line without y movement) in a 
 frontend application? Or do I have to patch the backend part? Is there any

It has little to do with the frontend. Scanners are designed to scan
whole 2D documents, so making just a frontend will not be
enough. You'll probably have to find a scanner that can do this in
hardware (not easy, I suppose), then probably modify its backend.

 Is there a counterpart to sane_get_parameters() for setting those
 parameters, like lines and pixels? 

The name of sane_get_parameters() can be misleading. It is supposed to
return secondary values, i.e. values calculated from the scan options,
such as the total number of bytes. Options are set using
sane_control_option(), that's what you're looking for, I suppose.

 Anybody out there, who can give me some hints or who can say: Forget It!

Given that (most?) scanners weren't designed for real-time scanning,
I'd suggest you look at video cameras instead. It should be fairly
easy to do what you want by using a digital video camera, dissect the
DV stream so as to take one line only, then use that to generate your
music.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Affordable film scanner

2003-03-25 Thread Major A
 The Canon FS27XX scanners are cases where you need a large gamma
 to obtain good results (2.0-2.5). Right now the backend collects
 12-bit data and converts them to 8 bit with a 4096 byte gamma
 table (or exports them as 16-bit data). This usually works well;
 but I admit that there are situations where a few more bits of depth
 would be welcome.

That's the case for Coolscans just as well.

 Even if your scanner has got exposure controls, the question remains
 whether it scans with fixed settings and manipulates the raw
 digital data, or whether it really adjusts the gain and zero of
 the amplifiers. This is probably the point where some companies
 try to save money; good analog circuitry is expensive.

Analog gain doesn't do too much good because the limiting factor is
always the CCD, not the ADC -- you would only be amplifying extra
noise if you increased analog gain. What Coolscans do is to let you
allow to change the exposure time for each channel separately. This
way you get the best of it all -- twice the exposure means sqrt(2)
better signal-to-noise ratio.

Changing the exposure separately per channel is a bit tricky with
scanners that use a white light source, since all colours are scanned
at the same time, whereas the Coolscans scan one after the other. But
it should still be possible to change the overall exposure time -- are
you definitely certain that the FS27xx doesn't allow you to do that,
or is it just the current drivers (Window$ or SANE) that can't do it?

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Re: Affordable film scanner supported by SANE

2003-03-23 Thread Major A
 Not necessarily: It is possible to have ICC profiles that only contain
 a matrix (matrix shaper profile). 

OK, in this case the LUTs are simply neutral (1:1) or can at least be
handled as such.

  2. Exposure can be incorporated into the first LUT. This would avoid a
 LUT that discards the top (bright) end of the scale, therefore not
 making ideal use of the CCD's noise performance.
 
 That is if the scanner actually supports an exposure control. The scanners I 
 deal with (EPSON) don't expose this control. 

Yes, but most film scanners do. It makes things a bit more complicated
in the sense that there is no such thing as absolute exposure for
these scanners, and the ICC profiles assume one particular exposure
setting. We can only speculate what these exposure settings are for
the manufacturer-supplied ICC profiles. (I suggest they are probably
the full-white ones that give maximum value for R, G, and B channels
with a fully transparent object, i.e. no film.)

So, my suggestion is that we define new well-known options for
exposure in the R, G, and B channels (and maybe IR? -- Coolscan
scanners don't allow IR exposure to be modified). This would be a
fixed-point value acts proportionally, and the full-white setting
corresponds to a value of 1. for each of the R, G, B
channels. Obviously the backends would then have to have hardwired
absolute exposure values that calibrate the scanner, or we could put
these in the config file so that they can be adjusted (I'd prefer the
latter).

 The advantage of the first one is that Marti is an expert as far as color,
 color management and ICC profiles go. LCMS is part of all major Linux
 distributions and is used by e.g. ImageMagick. This means that there is
 quite a bit of testing done on the lcms code, which probably is not
 true for gcms. My vote is for lcms, even though we have you on the list.
 With your gcms background, you should be able to pick up the lcms
 functionality without any problems (that is, if you want to get into
 this CM stuff in Sane at all).

I agree. I'm happy to do the CMS stuff within xsane using lcms, but
probably not in the next two months because I'm very busy.

Here are two more issues that have just come to mind:

- Some scanners support IR data and thus allow defect removal. This
  should really be done before the matrix is applied -- i.e., on the
  raw data retrieved from the scanner. I think there should be a
  meta-backend that does this, which can be fully transparent for
  anything else. (This would also separate the task of writing
  defect-removal code from everything else.)

- It might be worth using standard orange-mask RGB values to simply
  manipulate a standard profile of the scanner rather than having to
  supply a profile for each scanner-film combination. I'm not sure
  this makes sense though.

Good night,

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Re: Affordable film scanner supported by SANE

2003-03-19 Thread Major A
 According to various readings, every scanner has a different CLUT[*]. 
 Every film needs also a different CLUT.
 
 http://www.photo.net/bboard/q-and-a-fetch-msg?msg_id=000QOR
 http://www.photo.net/bboard/q-and-a-fetch-msg?msg_id=000E8u

Before we start creating custom LUTs for each scanner-film
combination, I just want to throw in that it would be a better idea to
generate ICC profiles. These are more general than just defining LUTs
for each channel. Many film scanners are supplied with ICC profiles,
but I don't know how good they are.

Maybe it's finally time to add ICC support to a SANE?

Also, every scanner-film combination has a different set of exposure
values (for negative films), maybe it would be a good idea to
incorporate that into the ICC profiles?

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Re: Affordable film scanner supported by SANE

2003-03-19 Thread Major A
 Can you give some details what has to be done for that? Are changes
 necessary for the backends, frontends and/or the API?

I don't think much has been done yet. I don't think we need to change
any backends (the only thing would be if backends wanted to supply
their own ICC profiles, for which a new API function would be ideal).

The rest is not that simple... ICC profiles work by applying a LUT to
each channel, then transforming with a matrix, and finally applying
another set of LUTs. This can all be done in the frontend, but it
would be possible to optimize things a bit:

1. The first LUTs can be done in hardware by the scanner. This makes
   sense because most of the time they serve the purpose of
   linearizing the incoming data in terms of perceived colour -- that
   means, we could probably afford to only obtain 8-bit data from the
   scanner, which would speed up scanning.

2. Exposure can be incorporated into the first LUT. This would avoid a
   LUT that discards the top (bright) end of the scale, therefore not
   making ideal use of the CCD's noise performance.

Both would require changes to the frontend only, but for 2., we would
have to add well-known options to the SANE standard.

As of programming, there are basically two choices if you want an
open-source colour management system: lcms (which seems to have
evolved into a standard library, it's part of Debian as well), and
gcms, which nobody seems to actively use. The advantage of the latter
is that the developer is on this list (me that is).

To summarize, I think these changes are necessary:

1. new API function(s) for providing ICC profile data through the SANE
   protocol. This would be good because then a backend would have
   access to its own profiles and supply them to any frontend, even it
   the frontend runs on a different computer.

2. incorporate ICC-based transforms into the frontend(s), along with
   options to store scans in a variety of colour spaces (XYZ and Lab
   as well as sRGB, Adobe RGB, etc.)

3. optionally, define new standard options for exposure, which can be
   used (optionally) by the frontend

4. ideally, we also want a (SANE-independent) tool for creating
   profiles based on scans from calibrated targets.

Hope this makes sense,

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Re: Affordable film scanner supported by SANE

2003-03-18 Thread Major A
 Orange mask: at least with Coolscan2, this one is trivial: adjust the
 exposure times of the R, G, B channels so that the space between two
 frames comes out exactly white. If you then scan with these settings
 and invert, all colours will be correct, and you have used the scanner
 at its best -- you get the best possible noise performance out of it.
 
 What about automating that process ? Couldn't we set up pre-loaded profiles 
 for that operation ? I personnaly have a bunch of different neg films and 
 could help with my LS-30 by providing data. 

Just an idea -- since this is bound to become an issue with more than
just the Coolscan2 backend, how about adding a preference memory
feature to xsane? You could save multiple sets of settings for the
same backend and recall them any time. This way you could set up one
for each type of film you are using. We could also add a flag to the
options in SANE2 that tells the front-end whether a particular option
is specific to the scanner as a whole or just the object to be
scanned: xsane would then have a way of saving exposure values but not
resolution and bit-depth, for example.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Affordable film scanner supported by SANE

2003-03-16 Thread Major A
 At the end of the day the problem with SANE and film scanning is that
 there is no SANE front end with decent orange mask removal, dust removal,
 multi pass scanning, faded negative correction etc. etc. The end result
 is that it is somewhat sucks when compared to VueScan.

Orange mask: at least with Coolscan2, this one is trivial: adjust the
exposure times of the R, G, B channels so that the space between two
frames comes out exactly white. If you then scan with these settings
and invert, all colours will be correct, and you have used the scanner
at its best -- you get the best possible noise performance out of it.

Dust removal: we're working on it. It's already pretty good but
usually requires adjustments for each scan.

Multi-pass scanning: is this really a front-end issue? (Otherwise I'm
the culprit here since it's not yet in Coolscan2.)

Faded negative correction should be done in GIMP really. Pity
mainstream GIMP only supports 8bpp colour.

 Note that in the UK at least you can get your hands on the old Minolta
 models like the Dual Scan II, Scan Elite etc. quite cheaply.

Check ebay, some older Coolscan scanners (LS-30/LS-2000 is the oldest
one I would consider, previous ones didn't have an IR channel) pop up
there every now and then.

 Get something with an IR channel. I didn't and regret it totally, to the
 point that I intend to replace my Scan Dual II as soon as funds allow
 with something that does have an IR channel.

The IR channel certainly helps, but it has also been reported that
scanners with LED sources exaggerate defects and therefore need an IR
channel only to remove what a scanner with a xenon light source
wouldn't see anyway. I'm sure there is some truth to it, a decent
xenon-based scanner can probably give you a cleaner scan from a
(clean!) frame than any Coolscan ever could. Then again, if you keep
your films in a puddle, there's nothing that can beat an IR channel.

I'm told that Minolta is a special case, it seems, their scanners
bring out defects because they use image sharpening within the
scanner.

 There is a mailing list dedicated to film scanners. It is not specific
 to any OS, but would be relevant if you have no idea what you are doing.
 Try Googling a bit harder.

I don't think there is any traffic on it right now -- I think I'm a
subscriber and I haven't got a message for quite some time.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Affordable film scanner supported by SANE

2003-03-16 Thread Major A
Jonathan,

I think you have a strong bias towards VueScan. That's fine, but it
doesn't mean we have to give up coding to make things better. And it
certainly doesn't mean SANE is by definition inferior to VueScan.

  Orange mask: at least with Coolscan2, this one is trivial: adjust the
  exposure times of the R, G, B channels so that the space between two
  frames comes out exactly white. If you then scan with these settings
  and invert, all colours will be correct, and you have used the scanner
  at its best -- you get the best possible noise performance out of it. 
 
 Yes you can do it. Does it match up to what VueScan does, and the ease
 with which it does it yet; not in the slightest.

What's easier than setting the scanner up (in about 5 minutes) once
for a given type of film and then scan millions of frames with these
settings? No, VueScan doesn't make life easier and doesn't give better
scans either. I've scanned 150 C41 frames at full frame, full
resolution with IR correction with the LS-30, and it didn't take me
more than an afternoon. I don't think VueScan could beat that.

  Multi-pass scanning: is this really a front-end issue? (Otherwise I'm
  the culprit here since it's not yet in Coolscan2.) 
 
 It depends if the scanner supports it and not all do. The basic problem
 is that the SANE standard has no standard way of passing the information
 between frontend and backend on whether you want multipass scanning or
 not.

It the scanner doesn't support it, then it's probably not a very good
idea anyway -- you'll run into registration problems if you scan the
same image multiple times just to get the data to be averaged.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Affordable film scanner supported by SANE

2003-03-15 Thread Major A
 However, there seems to be few in the affordable range (around and 
 below) ~400$ that are supported by SANE. Without knowing about support, 
 I had considered the Minolta Dual Scan III. It seems to not be working 
 very well, if at all.
 Epson doesn't seem to work very well either. Anyhow, they seem to 
 abandon their products (no matter if they provide specifications, right?).

It's long since EPSON abandoned their FS200, but I think there is a
working backend for it, but not within the main SANE source. AFAIK,
Minolta is totally unsupported due to the lack of documentation, so
are all those Jenoptik/Reflecta, Acer/Benq, etc. low-end scanners you
find in every shop today. I'm not sure about Canon. No support for
Polaroid and high-end scanners either (Leaf, Imacon, etc.) There is
support for some old film scanners made by Microtek, but I don't know
the details.

The only current scanner line that has full SANE support is the Nikon
Coolscan range. Get any Coolscan scanner, and it will work (or tell me
if it doesn't and we'll fix it). ICE is still work-in-progress, but it
shouldn't be too hard to work out the algorithms for anyone who has a
weekend free and a fast computer.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Updating sane-backends

2003-03-11 Thread Major A
 *** WARNING: SANE is already installed (version 1.0.8). The old
 *** installation is at /usr while SANE will now be installed
 *** at /usr/local. It is recommended to uninstall the old SANE version
 *** before installing the new one to avoid problems.

You can still install yours in /usr/local, but you must be careful
with the frontends -- the ones you currently have from your RPMs will
probably continue using your old SANE backends.

 error: Failed dependencies:
libsane.so.1 is needed by (installed) sane-frontends-1.0.8-4
libsane.so.1 is needed by (installed) xsane-0.84-8
libsane.so.1 is needed by (installed) xsane-gimp-0.84-8
sane-backends = 1.0.8 is needed by (installed) 
 sane-frontends-1.0.8-4

Uninstall these as well, and install them from source. As far as I
know, xsane-gimp and xsane RPMs are complementary to each other, you
don't need xsane if xsane-gimp works (i.e. if you have GIMP
installed).

After removing these RPMs, you need to compile sane-backends from
source, and install xsane from source as well. If you want to use
xscanimage as well, also install sane-frontends (but it's not required
by xsane or sane-backends).

 Can someone please offer a suggestion?  I would prefer not to have to 
 uninstall and reinstall sane-frontends, xsane and gimp in order to 
 update the backends files.  Or better yet, is there a way to upgrade the 
 Plustek driver, without disturbing anything else?

You don't need to reinstall GIMP. The only thing you might want to do
is to create a symlink from your GIMP plugin directory to the xsane
binary that you installed from source.

Another solution would be saned, that way you could use your existing
RPMs for the frontends and the net backend, and a new SANE in
/usr/local that runs saned, but that's a bit over the top, if you ask
me.

It's easiest to install things from source. RPMs are easy to install,
so why not just remove the abovementioned ones and retry?

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] does order of options for scanimage matter?

2003-03-07 Thread Major A
  SCANIMAGE.EXE -d hp --mode Color --resolution 150
  --brightness 20 --contrast 40 -l15 -t35 -x60 -y105   tst.pnm
  
  scans the correct section, but
  
  scanimage.exe -d hp -l 15 -t 35 -x 60 -y 105 --mode
  Color --resolution 150 --contrast 40 --brightness 20  tst1.pnm
  
  does not.
 
  does order of options for scanimage matter in general or for specific 
  backends?
 
 The order does matter. Setting one option may change the availability
 of others, e.g. threshold is only avaliable if in lineart mode.
 
 However, I don't see what's wrong in this case. Maybe backend-specific.

Just an idea, without having looked at the backend code: maybe the
backend calculates the scan area (in the scanner's units) based on the
(wrong) default resolution instead of that set (later) on the command
line?

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Shotcut to detect IRQ

2003-03-02 Thread Major A
 KDE desktop

The important thing here is the underlying operating system, I assume
you are using Linux.

 # chmod -c 0777 /dev/sg1

Do you have to do this every single time? BTW, 0777 is misleading
(though it will work), 0666 is correct. (Though it's probably a good
idea to create a new group for the scanner and/or run saned if you
have other SCSI devices connected to the computer.)

 mode of `/dev/sg1' changed to 0777 (rwxrwxrwx)
 # /sbin/insmod aha152x aha152x=0x140,9,7,0

You can either put the line aha152x aha152x=0x140,9,7,0 in
/etc/modules to have the module loaded at boot-time with the right
parameters, or place a line options aha152x aha152x=0x140,9,7,0 in
/etc/modutils/aliases to tell insmod/modprobe which options to use
when loading the module. Remember to run update-modules after
modifying /etc/modutils/aliases.

The filenames are correct on Debian systems, they might not be on your
system, but the files should be pretty easy to find. (The
update-modules stuff might not even exist on other systems, in which
case you'll have to edit /etc/modules.conf instead, and it's not
necessary to run anything afterwards.)

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] stupid question about SCSI

2003-01-29 Thread Major A
 The scsi card has all sorts of letters and numbers so here goes
 
 Chip = DOMEX436P

OK, here we go, after a google search:

  http://www.domex.com.tw/driver/d_3181.htm

No word about linux, of course.

It IS the ISA card I was talking about, with the DTC436P chip on
it. It is not supported by Linux, or at least not properly (there is
only one success story of someone using it in Linux, but that was back
in 1997, and I couldn't reproduce the results back then).

Do yourself a favour and get a decent card instead.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Coolscan2 IR channel problem

2003-01-23 Thread Major A
 OK, this is what I've done.  In order to rule out scanner hardware
 problems, I installed WindowsME onto a spare computer and tried out the
 scanner with its windows driver and Nikon software with Digital ICE(tm). I
 understand that it is the technology that makes use of the IR data.  It
 worked fine.  The second IR scan was performed and scatch and dust flecks
 were removed as advertised.
 
 I still can't get the scan table to move on Linux, however, and the color
 and IR data are still no good.  Any suggestions on what to do next?

What frontend did you use?

Could you please try this:

  SANE_DEBUG_COOLSCAN2=255 xsane

Turn IR on and press scan. Then send me the output.

Use xscanimage instead of xsane isn't installed.

Did you compile SANE from the source code, or did you install a binary
package (RPM or so)?

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] stupid question about SCSI

2003-01-23 Thread Major A
 I am working on getting a Veugo 310S working for a friend out of the
 country--problem is does anyone know the SCSI card that this model
 scanner shipped with?? I have been going round in circles (better than

Can you tell me what kind of card it is? PCI or ISA? What's written on
the chip?

Many low-end scanners (Mustek, UMAX, etc.) are (or used to be)
supplied with a DTC card that was only supported by Linux using a
patch, but even then I could never get it to work.

As far as SCSI is concerned, it's probably better to invest $25-$30 in
a decent PCI SCSI card with a Symbios chip (usually 53c8xx). Just make
sure you have the right cable to fit its connector.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Coolscan2 IR channel problem

2003-01-17 Thread Major A
  I'm having a problem with my Nikon Coolscan 4000 ED in getting scanimage
  to do its second scan of IR data.  I'm using sane version 1.0.9 and with
  this command line:
  
 scanimage -d coolscan2:scsi:/dev/sg1 --infrared=yes --batch-count=2
  
  The scan table doesn't move.  I get two files, with the second file being
  about one-third the size of the first one and containing gray-scale data,
  which is OK.  Unfortunately, the data in both files are just made up of
  vertical lines, presumably because the scan table doesn't move.
 
 Just guessing, does the following work?
 
 scanimage -d coolscan2:scsi:/dev/sg1 image.pnm
 scanimage -d coolscan2:scsi:/dev/sg1 --infrared=yes ir.pnm

Ah, didn't realize the original email one went to the list...

No, this won't work because the coolscan2 backend stores the IR
information in memory and only dumps it when you scan a second
time. This can only work if both scans are done within the same
instance of the backend running.

The problem here must be something weird because I've done scans like
that and it worked (although it's on an older scanner).

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] How many scanners on an ieee1394 bus

2003-01-12 Thread Major A
 Does anyone know how many scanners you can hang on an ieee1394 or USB 2.0 
 bus and still get sane to work on all of them?

As many as these busses take, in principle. There might be a limit on
IEEE1394 simply because you run out of sg devices after a while, but
I'm not sure what the limit is. As a matter of fact, I'm not even sure
how many devices you can have on an IEEE1394 or USB2.

As far as SANE is concerned, there should be no limit, all devices
should work independently from each other.

The only problem comes when you have two identical scanners and want
to tell them apart in software, but what do you want that for
anyway...

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Working problems

2002-12-01 Thread Major A
- Karl Larsen k5di Las Cruces,NM Az ScQRPions -

LOL -- a ham asking a gnucash question on the SANE list. Dear OM, I
think you sent your email to the wrong address...

73,

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Compilation error on Compaq Tru64

2002-11-20 Thread Major A
 Oops. That would be me who is responsible for ab306.c. On the other
 hand on first sight it maybe an error in the header (?), as I don't
 see any suspicious changes between SANE 1.0.1 (oldest version in CVS)
 and now. And I'm sure I ran 2.0.x at that time.

1.0.2 was successfully installed on the very same machine, everything
else has remained the same since, including kernel, headers,
libraries, gcc, binutils.

 If you have too much time you can have a look at
 /usr/include/asm/system.h:140 and find out why there is an
 unterminated string.

I always have too much time :-(

The lines it complains about are of the form

__asm__ __volatile__(

If I omit the -pedantic flag to gcc, it no longer complains about
this, but about

/usr/include/asm/io.h:107: `sparc_cpu_model' undeclared (first use this 
function)

This is what a grep gives:

/usr/include/asm/auxio.h:   switch(sparc_cpu_model) { \
/usr/include/asm/floppy.h:  if((sparc_cpu_model != sun4c  sparc_cpu_model 
!= sun4m) ||
/usr/include/asm/floppy.h:  if(sparc_cpu_model == sun4m) {
/usr/include/asm/floppy.h:if(sparc_cpu_model == sun4c) {
/usr/include/asm/io.h:  switch(sparc_cpu_model) {
/usr/include/asm/io.h:  printk(mapioaddr: sparc_cpu_model = %d\n, 
sparc_cpu_model);
/usr/include/asm/io.h:  switch(sparc_cpu_model) {
/usr/include/asm/io.h:  printk(unmapioaddr: sparc_cpu_model = %d, 
halt...\n, sparc_cpu_model);
/usr/include/asm/pgtable.h: switch (sparc_cpu_model){
/usr/include/asm/pgtable.h: switch (sparc_cpu_model){
/usr/include/asm/system.h:extern enum sparc_cpu sparc_cpu_model;
/usr/include/asm/system.h:#define ARCH_SUN4C_SUN4 (sparc_cpu_model==sun4c)

Any ideas?

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Compilation error on Compaq Tru64

2002-11-19 Thread Major A
Henning,


 On the other hand, they really have nice computers:
 
 AlphaServer ES45, 4@1GHz, Tru64
 
 time make -j4:
 real 0m48.473s
 user 0m39.115s
 sys  0m31.299s
 
 Slightly faster than yours :-) Well, I want to have one of those :-)
 Quite fast if you consiere, that it's used by quite a lot of users.

I'm sure I can't beat that today (although my next PC probably will --
in a few years' time).

I can't beat your 386 either, but here a pretty slow one:

iPAQ H3650, also from the HP TestDrive, 195MHz StrongARM-1110, 32MB
RAM. It configures like this:

  enabling DC210/DC240 backends
  disabling CANON_PP backend (failed to find required libieee1284 version)
  disabling HPSJ5S backend (failed to find required libieee1284 version)
  disabling GPHOTO2 backend (not requested, or failed to find
  gphoto2-config or JPEG lib)
  disabling PINT backend
  enabling QuickCam backend
  enabling Video4Linux backend
  enabling NET backend
  disabling SM3600 backend
  enabling SnapScan backend

in

  real3m38.541s
  user0m43.970s
  sys 0m41.420s

after which the actual build is

  real42m50.703s
  user32m47.140s
  sys 3m51.420s

It seems to build without errors. Sorry I couldn't test anything on
it, maybe we should ask HP to connect a USB scanner or so?

I originally wanted to give you a real killer slug but gave up on it:
a 40MHz SPARCstation 1+ from 1988 with 16MB RAM running diskless as a
SANE server (1.0.2 at the moment). The two problems I had compiling is
that current SANE doesn't like the linux 2.0.x header files still on
that machine, and that 16MB isn't enough for some of the backends (and
linux 2.0.x can't swap to NFS). It would have taken a really long time
though.

Oh, BTW, the HP iPAQ has its clock set to 1934 for some reason, sure
it's way ahead of its time.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Compilation error on Compaq Tru64

2002-11-19 Thread Major A
 Oh. That's because of sanei_scsi.c? We should add a hint in
 README.linux.

This is the error:

gcc -c -DHAVE_CONFIG_H -I. -I. -I../include -I../include -D_GNU_SOURCE 
-DPATH_SANE_CONFIG_DIR=/usr/local/sane/etc/sane.d 
-DPATH_SANE_DATA_DIR=/usr/local/sane/share -DV_M
AJOR=1 -DV_MINOR=0 -g -O2 -W -Wall -Wcast-align -Wcast-qual 
-Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wreturn-type 
-Wstrict-prototypes -pedantic -ansi
 sanei_ab306.c  -fPIC -DPIC -o sanei_ab306.lo
In file included from /usr/include/asm/io.h:9,
 from /usr/include/sys/io.h:27,
 from sanei_ab306.c:53:
/usr/include/asm/system.h:140: unterminated string or character constant
[repeated a number of times]

There could be something in sanei_scsi.c as well, but it doesn't get
that far.

This is kernel 2.0.35.

Note that this is 1.0.9-pre2, haven't tried the released version, but
it shouldn't be much different.

 Well, if I remeber correctly, my 16 MB computer wen about 40 MB into
 swap when compiling SANE :-).

I had to connect an external SCSI drive as swap when I compiled 1.0.2
a long time ago.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Compilation error on Compaq Tru64

2002-11-13 Thread Major A
 I'm trying to compile sane-backends-1.0.9 on some of the HP test
 machines (see http://testdrive.hp.com/). Until now, the tests were
 rather successful. Compilation works on:

How the f... did you connect to them? I can't get a route to any of
the machines, neither from Britain nor from Germany. I've told them
10 times, they don't respond.

 Tru64 Unix 5.1A/Alpha/cc:
 Compilation results in:
 
 Looks like cc can't handle its own include file? Anyone any ideas?

I reported this one a while ago (just before the 1.0.9 release). I
thought it's just our installation of Tru64, but if even HP does it
wrong, then it probably isn't.

A while ago, a SunOS UltraSPARC here at university used to I/O error
on one of the backends -- reproducibly. I hate commercial software!

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Compilation error on Compaq Tru64

2002-11-13 Thread Major A
  How the f... did you connect to them? I can't get a route to any of
  the machines, neither from Britain nor from Germany. I've told them
  10 times, they don't respond.
 
 The have a rather restrictive firewall setup. Looks like only telnet
 and ftp goes through, not even ssh or ping. I'm using Telekom/T-online
 DSL. No problems with most testdrives, but some seem to be down.

OK, thanks. Telnet seems to work now (it didn't yesterday). It's kind
of stupid that they don't allow ssh -- ssh used to work.

 Traceroute goes that way:
 [...]
 15  us-zma-r04.zma.compaq.com (192.208.49.14)  153.810 ms  154.571 ms  
 156.502 ms
 16  * * *

A week ago, in fact even before they moved the machines, there was a
recursive route between us-zma-r04 and us-zma-r01.

After all that, why should I trust in HP's competence in network
maintenance and security? :-(

And yes, it's Tru64 that has buffer overflows in xauth and lpd, and
that supplies a SUID root dtterm that segfaults when run in fvwm.

 Yes, I remember. I think I found the problem: config.h defines
 u_int8_t and others and so the lines in sys/bitypes.h look like this
 after macro expansion:
 
 typedef unsigned char unsigned char, something;

Shouldn't config.h be included after all system headers? Is there any
reason for not doing that? Then we can either make the SANE typedefs
conditional or simply #undef the types we redefine.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Xsane notes

2002-11-07 Thread Major A
 E.g. man pgm states, that width and height are  formatted as ASCII 
 characters in decimal. If some image viewer interprets the width/height as 
 an octal number, I think one could call this a bug. 

OK, thanks for that, I wasn't aware of that manpage. In this case,
it's a bug in gqview.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


[sane-devel] Xsane notes

2002-11-06 Thread Major A
   # XSane settings:
   #  resolution_x =  200.0
   #  resolution_y =  200.0
   #  gamma  = 1.00
   #  brightness =  0.0
   #  contrast   =  0.0
   # XSANE data follows
   01696 0
   255
 
 I Don`t know gqview. The header looks ok.

Please bear in mind that, by convention, integers starting with 0
followed by another digit are taken to be octal numbers in most
programs. Apparently, gqview simply does a strtol() on the line with
the third parameter set to 0, thus realizing the first number in the
line is octal. It stops when it encounters the 9, which is invalid
in the octal base, the second strtol() then picks up at the
9. That's why the image size is taken to be 14 (which is 016 in
octal) times 96.

Unless the PNM standard (is there such a thing?) specifies explicitly
that decimal base be used, this is a bug in SANE, whereever it is --
image dimensions must not have leading zeros.

  Andras

===
Major Andras
e-mail: and...@users.sourceforge.net
www:http://andras.webhop.org/
===


  1   2   >